I hereby claim:
- I am aichholzer on github.
- I am safetrip (https://keybase.io/safetrip) on keybase.
- I have a public key ASAe8kSBgNpTrhWMn91T-IVFUb10kS1rJ6G_K11Rl9EGRgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env node | |
/* eslint no-console: 0 */ | |
const AWS = require('aws-sdk'); | |
AWS.config.update({ region: 'ap-southeast-2' }); | |
const db = new AWS.DynamoDB.DocumentClient(); | |
const [, , from, to] = [...process.argv]; | |
if (!from || !to) { | |
console.error('\n 💥 The "from" and "to" arguments are required.'); |
function int2ip (ipInt) { | |
return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) ); | |
} |
const ced = '0931811087'; | |
let [suma, mul, chars] = [0, 1, ced.length]; | |
for (let index = 0; index < chars; index += 1) { | |
let num = ced[index] * mul; | |
suma += num - (num > 9) * 9; | |
mul = 1 << index % 2; | |
} | |
if ((suma % 10 === 0) && (suma > 0)) { |
const http = require('http'); | |
const { readFile } = require('fs'); | |
const { gzip } = require('zlib'); | |
const { promisify } = require('util'); | |
const run = async () => { | |
try { | |
const data = await promisify(readFile)('./menu.json'); | |
const req = http.request({ | |
method: 'POST', |
const sample = { | |
a: 'Hello', | |
b: '', // Will be removed | |
c: null, | |
d: { | |
a: 1, | |
b: '', // Will be removed | |
c: 3, | |
d: { | |
a: 1, |
/** | |
* Element fadeIn plugin for jQuery. | |
* @author Stefan Aichholzer <https://github.com/aichholzer> | |
* @param options -Object defining the animation's end result. | |
* | |
* { | |
* opacity: 1, | |
* marginBottom: 5, | |
* duration: 50 | |
* } |
const heartbeats = [1, 2, 3].map((value) => Promise.resolve({ id: value, date: +new Date() })); | |
Promise.all(heartbeats).then((values) => { | |
console.log(values.map((value) => !value.date ? null : { | |
id: value.id, | |
name: 'location', | |
heartbeat: value.date | |
}).filter(v => v).sort() | |
); | |
}); |
export PS1="\n\[\033[1;102m\]\[\033[1;30m\] \A \[\033[1;103m\]\[\033[1;30m\] \u \[\033[0;107m\]\[\033[1;30m\] \w \[\033[0m\] \[\`if [ \$? != 0 ]; then echo 😠 ' '; fi \`\]" | |
alias ls='ls -lhaG' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
alias gm="grunt nodemon" | |
alias gish="ssh -T git@github.com" |