encrypt:
openssl aes-256-cbc
decrypt:
openssl aes-256-cbc -d
function unlink(file) { | |
return new Promise((resolve, reject) => { | |
file.remove(resolve, reject) | |
}) | |
} | |
function resolveUrl(url) { | |
return new Promise((resolve, reject) => { | |
window.resolveLocalFileSystemURL(url, resolve, reject) | |
}) |
encrypt:
openssl aes-256-cbc
decrypt:
openssl aes-256-cbc -d
#!/bin/bash | |
set -e | |
args=( | |
echo | |
this | |
# but not this | |
) |
#!/usr/bin/env python | |
import subprocess | |
import json | |
from datetime import datetime | |
def ssh(*args, **kwargs): | |
user = kwargs.get('user', 'mgax') | |
out = subprocess.check_output(['ssh', user+'@herald'] + list(args)) | |
return out.splitlines() |
sudo apt-get install -y curl python2.7 python-virtualenv python2.7-dev build-essential postgresql-9.4 postgresql-server-dev-9.4 libxml2-dev libxslt1-dev | |
sudo spt-get install -y antiword poppler-utils pstotext tesseract-ocr flac lame libmad0 libsox-fmt-mp3 sox | |
mkdir /var/local/aleph | |
cd /var/local/aleph | |
sudo chown `whoami`: . | |
virtualenv venv | |
source venv/bin/activate | |
git clone https://github.com/pudo/aleph.git | |
cd aleph | |
pip install -r requirements.txt |
{ | |
"savedGeneration": [ | |
{ | |
"wheelCount": 2, | |
"wheel_radius": [ | |
0.6898431876594318, | |
0.6779555255077012 | |
], | |
"wheel_vertex": [ | |
5, |
#!/bin/bash | |
set -e | |
args=( | |
echo | |
hello world | |
) | |
set -x |
/node_modules | |
/www |
# https://major.io/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/ | |
echo 1 > /proc/sys/kernel/sysrq | |
echo b > /proc/sysrq-trigger |
show info about volumes
megacli -LDInfo -Lall -Aall
create volume, raid0 (-r0
), disk 3 ([252:3]
), array 0 (-a0
)
megacli -CfgLdAdd -r0 [252:3] -a0
write-through, read-ahead, don't cache if battery is down