1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-06-15 14:47:53 +02:00
This commit is contained in:
Rico Sta. Cruz 2016-08-11 18:26:59 +08:00
parent f75a70bafc
commit 8612d447b7
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
5 changed files with 30 additions and 18 deletions

3
ets.md
View File

@ -4,7 +4,7 @@ category: Elixir
---
```elixir
iex> table = :ets.new(:my_table)
iex> table = :ets.new(:my_table, [])
8211
iex> :ets.insert(table, {:fruit, "Apple"})
@ -12,6 +12,7 @@ iex> :ets.lookup(table, :fruit)
[{:fruit, "Apple"}]
iex> :ets.delete(table)
iex> :ets.delete_all_objects(table)
```
### Flags

View File

@ -13,9 +13,7 @@ hledger reg {query}
## Query
Queries are used on all commands (`bal`, `reg`, etc).
### Accounts
Queries are used on all commands (`bal`, `reg`, etc). [(docs)](http://hledger.org/manual.html#queries)
```
Assets # An account (regex)
@ -25,27 +23,20 @@ inacct:'A:B' # transactions related to account
acctonly:A # no subaccounts
inacctonly:A # same, but no subaccounts
```
### Amounts
```
amt:2000 # amount (in absolute value)
amt:<200 # amount comparison (in absolute value)
amt:<+200 # amount comparison
# also: <=, >, >=
```
### Other queries
```
desc:REGEX
code:REGEX
desc:REGEX # description
code:REGEX # transaction code (check number?)
tag:REGEX
cur:'\$'
```
```
real: # real posts
real:0 # virtual posts
depth:N # --depth 2
not:... # eg, not:status:!
```

View File

@ -59,8 +59,8 @@ function checkStatus (res) {
if (res.status >= 200 && res.status < 300) {
return res
} else {
var err = new Error(response.statusText)
err.response = response
var err = new Error(res.statusText)
err.response = res
throw err
}
}

View File

@ -51,6 +51,19 @@ category: Node.js
"private": true,
"preferGlobal": true
### Config
```js
{
"config": {
"foobar": "hello"
},
"scripts": {
"run": "echo $npm_package_config_foobar"
}
}
```
### References
* http://package.json.nodejitsu.com/

View File

@ -74,6 +74,13 @@ rvm:
- gh-pages
- /^deploy/
### Apt packages
before_install:
- sudo apt-get update -q
- sudo apt-get install gcc-4.8 -y
<https://docs.travis-ci.com/user/installing-dependencies/>
### Etc
gemfile: