Skip to content

Instantly share code, notes, and snippets.

deanrock /
Created Jun 9, 2020
Spawn public EC2 instance
locals {
prefix = "random-ec2-instance"
provider "aws" {
region = "eu-central-1"
data "aws_vpc" "default" {
default = true
deanrock / example.conf
Created Dec 14, 2016
Node.js prerenderer for Angular etc.
View example.conf
location / {
# Angular/React/whatever frontend
root /home/example/frontend/dist;
try_files $uri @prerender;
# config for Node.js prerenderer
location @prerender {
deanrock /
Created Nov 8, 2016
Generate shell commands for migrating mail boxes from IMAP provider to Zimbra
import os
import sys
host1 = ''
host2 = ''
cos = 'cos-of-group-for-the-account'
data = """ password password3 password2"""
deanrock /
Created Oct 12, 2016
Find hacked .php files by comparing latest WP & plugins code with the version in your WP installation
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 = '' % name
import urllib2
set -e
# install Xcode Command Line Tools
if [ $? -eq 1 ]; then
touch /tmp/;
PROD=$(softwareupdate -l |
grep "\*.*Command Line" |
deanrock /
Last active Jul 5, 2016
How to setup titanium Android native development on Mac
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
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 /
Created Dec 14, 2014
install virtualbox additions for VB 4.3.20 Linux (Debian) guests
apt-get install -y linux-headers-$(uname -r)
cd /tmp
mount -o loop,ro VBoxGuestAdditions_4.3.20.iso /mnt
deanrock /
Created Feb 27, 2014
Mobitel SMS skripta
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"?>
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"