Skip to content

Instantly share code, notes, and snippets.

Nemanja Stefanović nemik

Block or report user

Report or block nemik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d365ff209654957650040a4e445ea53b
/tmp/keyfile - this is your key file. it could be anything, random text. an image. whatever you want
db_dump.sql.gz - this is your gzipped mysql dump
db_dump.sql.gz.enc - this is the output from the encryption, encrypted version if your gzipped DB dump, encrypted with your keyfile
TO ENCRYPT
openssl enc -aes-192-cbc -pass file:/tmp/keyfile -in db_dump.sql.gz -out db_dump.sql.gz.enc
TO DECRYPT
openssl enc -d -aes-192-cbc -pass file:/tmp/keyfile -in db_dump.sql.gz.enc -out db_dump.sql.gz
View gist:c8be84ef2fa8c3f89c4a2a49f2643d8d
from network import LoRa
import socket
import binascii
import struct
import time
import utime
# Initialize LoRa in LORAWAN mode.
# Please pick the region that matches where you are using the device:
# Asia = LoRa.AS923
View keybase.md

Keybase proof

I hereby claim:

  • I am nemik on github.
  • I am nemik (https://keybase.io/nemik) on keybase.
  • I have a public key whose fingerprint is 53E0 E937 8E84 56EF 5EB5 3FAD 18FB 1BB0 260C E822

To claim this, I am signing this object:

@nemik
nemik / gist:7745209
Created Dec 2, 2013
xbmc notification json api
View gist:7745209
curl -i -H "Content-Type: application/json" -d '{"id":1,"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"YO","message":"Heeeellloooo", "displaytime":3500 }}' "http://username:password@xbmc-box-ip:9191/jsonrpc"
View gist:4150147
NUM_PHOTOS="0"
PHOTOS[0]=""
i=0
for arg in "$@"
do
if [ "$i" == "0" ]
then
NUM_PHOTOS="$arg"
fi
PHOTOS[$i]="$arg"
View gist:4150130
try:
result = subprocess.Popen(["/bin/bash","/home/linaro/photobooth/photobooth_process.sh"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = result.communicate()
if result.returncode == 0:
return "ok"
return "%s %s %s" % (result.returncode, err, out), 500
except OSError as e:
return " ",e
You can’t perform that action at this time.