Skip to content

Instantly share code, notes, and snippets.

virtualenv venv --python=python2.7
sqlite> .open "test.db"
sqlite> SELECT * FROM table_name ... ;
To construct a date from UTC time, call “new Date(Date.UTC(year, month, day, hours, minutes, seconds))
"""
Created by @SaurabhPrakash and @zealfire
Running the file process
In the brandsite virtual env run following command for bpm zips
python manage.py update_bonita_dir <dir>/<subdir>
python manage.py update_bonita_dir ops/cancer-care-proposal-form
By default this command concatenates and minifies js and css file, use a command in this format to disallow this
python manage.py update_bonita_dir <dir>/<subdir> --nooptimize
"""
{
"id": "string (identifier)",
"name": "string",
"eTag": "string (etag)",
"cTag": "string (etag)",
"createdBy": { "@odata.type": "oneDrive.identitySet" },
"createdDateTime": "string (timestamp)",
"lastModifiedBy": { "@odata.type": "oneDrive.identitySet" },
"lastModifiedDateTime": "string (timestamp)",
"size": 1024,
from celery.contrib import rdb
rdb.set_trace()
https://stackoverflow.com/a/25087194/2750995
@zealfire
zealfire / install_forticlientsslvpn_linux
Created July 2, 2017 14:31
Install forticlient in linux. Replace HOST, PORT, USER and PASS.
sudo apt-get install expect
wget http://kb.cloud.it/files/tar-gz/forticlientsslvpn_linux_4-0-2281-tar.gz
tar xzf forticlientsslvpn_linux_4-0-2281-tar.gz
sudo mv forticlientsslvpn /opt/
cat > sslvpn << EOF
#!/usr/bin/expect -f
set timeout -1
cd /opt/forticlientsslvpn
spawn ./forticlientsslvpn_cli --server HOST:PORT --vpnuser USER
expect "Password for VPN:" {send -- "PASS\r"}