Skip to content

Instantly share code, notes, and snippets.

@deanrock
deanrock / messagingSimobil.js
Created Apr 7, 2013
Skripta za pošiljanje SMSov prek Klape iz Node.js
View messagingSimobil.js
/*
Primer:
messagingSimobil = require('./messaging.js');
var username = "ime";
var password = "geslo";
var sms = new messagingSimobil.messagingSimobil(username, password);
sms.sendSMS('040xxxxxx', 'sporočilo', function(messages_left) {
View [drupal] change database settings
def check_match(regex, line, type, value):
m = regex.match(line)
if m:
dj.log_info('found: %s' % m.group(0))
line = ' \'%s\' => \'%s\', \n' % (type, value)
dj.log_info('replaced: %s' %line)
return line
View gist:8068750
#include "inc/hw_gpio.h"
#include "inc/hw_memmap.h"
#include "inc/hw_sysctl.h"
#include "inc/hw_types.h"
#include "driverlib/gpio.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
@deanrock
deanrock / mobitel_sms.py
Created Feb 27, 2014
Mobitel SMS skripta
View mobitel_sms.py
import requests
class Mobitel_SMS:
def __init__(self, username, password):
self.username = username
self.password = password
def _send_request(self, action, body):
envelope = """<?xml version="1.0" encoding="utf-8"?>
@deanrock
deanrock / instal_vbox_additions.sh
Created Dec 14, 2014
install virtualbox additions for VB 4.3.20 Linux (Debian) guests
View instal_vbox_additions.sh
apt-get install -y linux-headers-$(uname -r)
cd /tmp
wget http://download.virtualbox.org/virtualbox/4.3.20/VBoxGuestAdditions_4.3.20.iso
mount -o loop,ro VBoxGuestAdditions_4.3.20.iso /mnt
/mnt/VBoxLinuxAdditions.run
@deanrock
deanrock / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@deanrock
deanrock / android_titanium.sh
Last active Jul 5, 2016
How to setup titanium Android native development on Mac
View android_titanium.sh
brew install ant
sudo pip install markdown
sudo pip install pycrypto
sudo pip install pyopenssl
sudo pip install pyyaml
sudo pip install Pygments
# install android SDK ver 21
...
View install_xcode8.sh
#!/bin/bash
set -e
# install Xcode Command Line Tools
#xcode-select
if [ $? -eq 1 ]; then
# https://github.com/timsutton/osx-vm-templates/blob/ce8df8a7468faa7c5312444ece1b977c1b2f77a4/scripts/xcode-cli-tools.sh
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
PROD=$(softwareupdate -l |
grep "\*.*Command Line" |
@deanrock
deanrock / wp_find_exploits.py
Created Oct 12, 2016
Find hacked .php files by comparing latest WP & plugins code with the version in your WP installation
View wp_find_exploits.py
import sys
import os
import re
from os import listdir
from os.path import isfile, join
def download_wp_plugin(name, path, temp_path):
url = 'https://wordpress.org/plugins/%s/' % name
import urllib2
@deanrock
deanrock / zimbra_migration_commands.py
Created Nov 8, 2016
Generate shell commands for migrating mail boxes from IMAP provider to Zimbra
View zimbra_migration_commands.py
import os
import sys
host1 = 'source.example.com'
host2 = 'destination.example.com'
cos = 'cos-of-group-for-the-account'
data = """test@example.com password
test3@example.com password3
test2@example.com password2"""