Skip to content

Instantly share code, notes, and snippets.

@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
@nikcub
nikcub / google-serp.user.js
Created Sep 14, 2012
rewrite google search result page to link directly to search result url
View google-serp.user.js
// 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
View chrome.refresh.sh
#!/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 Dec 12, 2018
Install Python 2.7.11 on Ubuntu 14.04
View README.md

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 Aug 20, 2012
Mute Spotify Ads
View Spotify.scpt
--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 Jul 22, 2017
Mega's (www.mega.co.nz) Privacy Policy, Copyright Notice and Terms of Service
View copyright.txt
@nikcub
nikcub / cscart-exploit.py
Last active Feb 25, 2017
CS-Cart Session Brute Force Exploit
View cscart-exploit.py
#!/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 Sep 3, 2016
OS X Command Line Password Generator
View genpass.py
#!/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 Jul 21, 2016
downtime tracker
View crontab
* * * * * ! ping -q -c1 www.google.com >/dev/null && echo `date` >> ~/.downtime.log >/dev/null 2>&1
View 737190602110963712.json
{
"created_at": "Mon May 30 07:55:10 +0000 2016",
"id": 737190602110963712,
"id_str": "737190602110963712",
"text": "URL shorteners. Again. Everyone with an inch of clue said these things were a bad idea from day 1. https:\/\/t.co\/R7AHg9Iltx",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],