Skip to content

Instantly share code, notes, and snippets.

View vpetersson's full-sized avatar
😎
¯\_(ツ)_/¯

Viktor Petersson vpetersson

😎
¯\_(ツ)_/¯
View GitHub Profile
@vpetersson
vpetersson / gist:4bb3a87f2af6998332d9
Created October 30, 2014 13:28
BitTorrent Sync sample config
{
"device_name": "My Sync Device",
"listening_port" : 0, // 0 - randomize port
/* storage_path dir contains auxilliary app files if no storage_path field: .sync dir created in the directory
where binary is located. otherwise user-defined directory will be used */
// "storage_path" : "/home/user/.sync",
/* set location of pid file */
// "pid_file" : "/var/run/btsync/btsync.pid",
import pytumblr
import requests
from pprint import pprint
from re import findall
from urlparse import urlparse
tumblr_blog = 'blog.viktorpetersson.com'
wordpress_site = 'http://viktorpetersson.com/'
source_file = '/Users/mvip/Desktop/pages.txt'
#!/bin/bash
NEWDEV='/dev/vdb'
# Partition the new disk as LVM
echo -e "n\np\n1\n\n\nt\n8e\nw" | sudo fdisk $NEWDEV
# Initiate the disk
sudo pvcreate $NEWDEV\1
@vpetersson
vpetersson / create_server.py
Created September 8, 2013 20:25
Simple snippet for creating servers on CloudSigma via the python module.
import cloudsigma
name = 'SomeName'
drive = cloudsigma.resource.Drive()
server = cloudsigma.resource.Server()
gb_in_bytes = 1024 * 1024 ** 2
test_disk = {