Skip to content

Instantly share code, notes, and snippets.

@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@nikcub
nikcub / torrc
Last active October 20, 2022 13:29
Tor Relay & Bridge Config
#
# tor relay / bridge config
#
# apt-get install tor
#
# yum install tor (after adding EPEL or similar as a repo)
#
# dump this config file into the default tor config file location (/etc/tor/torrc)
#
# see also: https://www.torproject.org/docs/installguide.html.en
@nikcub
nikcub / google-serp.user.js
Created September 14, 2012 07:21
rewrite google search result page to link directly to search result url
// Google SERP URL rewrite
//
// User script will rewrite search engine results page for Google and place real
// links to results rather than links that proxy back via google.
//
// So you go straight to the page when you click and you can copy/paste the link
//
// Install:
// 1. Download to desktop/wherever
// 2. Open Chrome extensions page (Window -> Extensions) or URL chrome://extensions
@nikcub
nikcub / chrome.refresh.sh
Created October 31, 2011 03:05
Chrome Refresh
#!/bin/bash
# Chrome Refresh
#
# nik cubrilovic - nikcub.appspot.com
#
# Simple applescript browser reloader for Google Chrome. It will either open a
# new tab with the url passed in as an argument or refresh an existing tab.
#
# Link this up with watchr to auto-refresh browser windows when you save files
@nikcub
nikcub / README.md
Last active December 12, 2018 16:14
Install Python 2.7.11 on Ubuntu 14.04

Install latest Python 2.7.11 on Ubuntu 14.04

This script will install the latest version of the 2.7.x branch of Python alongside the system Python in the users local directory and it will symlink all the binaries in ~/bin

Any app or daemon that you require to run with the latest Python just run it as either the separate user or make sure it is running from the Python linked into `/bin

Arguments

install-python.sh <version> <path>

@nikcub
nikcub / Spotify.scpt
Created August 20, 2012 16:43
Mute Spotify Ads
--Mute Spotify when ads are playing. Use if in a country where you can't
--purchase a pro account. Open AppleScript editor (Applications > Utilities)
--paste this script in and then go File -> Save As, change 'File Format' to
--'Application' and save somewhere. Run Spotify using that application.
set currentTrack to ""
do shell script "open -a \"Spotify\""
delay 5
@nikcub
nikcub / copyright.txt
Last active July 22, 2017 13:51
Mega's (www.mega.co.nz) Privacy Policy, Copyright Notice and Terms of Service
@nikcub
nikcub / cscart-exploit.py
Last active February 25, 2017 03:43
CS-Cart Session Brute Force Exploit
#!/usr/bin/env python
# CS-Cart session brute force exploit for v4.2.0
# see https://www.nikcub.com/posts/cs-cart-v4-2-0-session-hijacking-and-other-vulnerabilities/
import sys
import requests
import argparse
import re
import string
import random
@nikcub
nikcub / genpass.py
Last active September 3, 2016 02:30
OS X Command Line Password Generator
#!/usr/bin/env python
import sys
import os
import string
import random
DICT_FILE = '/usr/share/dict/words'
DEFAULT_LENGTH = 24
@nikcub
nikcub / crontab
Created July 21, 2016 02:34
downtime tracker
* * * * * ! ping -q -c1 www.google.com >/dev/null && echo `date` >> ~/.downtime.log >/dev/null 2>&1