Skip to content

Instantly share code, notes, and snippets.

@indolering
indolering / gist:133003
Created June 20, 2009 02:06
Ubiquity Command for lmgtfy.com (Let me google that for you)
//Note: This command was automatically generated by the create-new-search-command command.
CmdUtils.makeSearchCommand({
name: "lmgtfy-let-me-google-that-for-you",
url: "http://lmgtfy.com/?q={QUERY}",
icon: "http://lmgtfy.com/favicon.ico",
description: "Searches lmgtfy.com"
});
CmdUtils.makeBookmarkletCommand({
name: "Resize Window",
javascript:window.resizeTo(1280,720);window.location="about:blank",
});
@indolering
indolering / Tranquility.css
Created September 19, 2009 22:48
Tranquility
/*
=skin=
@name Tranquility
@author Zach Lym, based on Simpliquity by Yatrik Solanki,
@homepage http://gist.github.com/189622
@email [email protected]
@license MPL/LGPL/GPL
@indolering
indolering / dabblet.css
Created April 8, 2012 06:18
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@indolering
indolering / test.js
Created May 22, 2012 18:33
meemo test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>textInput</title>
<meta name="author" content="indolering" />
<meta name="description" content="simple text input box" />
<script type="text/javascript" src="http://meemoo.org/meemoo/v1/meemoo-min.js"></script>
set user to "PIA-USERNAME"
set pass to "PIA-PASSWORD"
set macAddHash to do shell script "/sbin/ifconfig en0 | /usr/bin/awk '/ether / {print $2}' | /usr/bin/tr -d ':' | md5 "
set vpn_ip to do shell script "ifconfig tun0 | grep inet | awk '{print $2}'"
set vpn_port to do shell script "curl -d \"user=" & user & "&pass=" & pass & "&client_id=" & macAddHash & "&local_ip=" & vpn_ip & "\" https://www.privateinternetaccess.com/vpninfo/port_forward_assignment | grep -oE \"[0-9]+\""
do shell script "defaults write org.m0k.transmission BindPort " & vpn_port & ""
@indolering
indolering / transmission-vpn-launcher.applescript
Last active September 21, 2019 13:42
Uses Private Internet Access REST API to set which port Transmission listens on, binds all Transmission traffic to the tun0 (typically OpenVPN) network interface, and then opens Transmission.
set user to "USERNAME"
set pass to "PASSWORD"
--set token automatically based on macaddress
set macAddHash to do shell script "/sbin/ifconfig en0 | /usr/bin/awk '/ether / {print $2}' | /usr/bin/tr -d ':' | md5 "
try
set vpn_ip to do shell script "ifconfig tun0 | grep inet | awk '{print $2}'"
--hack: must delete property before writing it but first run 'defaults delete' fails
@indolering
indolering / namecoind32
Created August 19, 2013 02:43
Broken 32bit install for namecoind onto a fresh ubuntu instance.
ubuntu@i-b6c9eac3:~$ wget http://dot-bit.org/files/namecoin_linux32.tgz
--2013-08-19 02:23:20-- http://dot-bit.org/files/namecoin_linux32.tgz
Resolving dot-bit.org (dot-bit.org)... 178.32.102.200
Connecting to dot-bit.org (dot-bit.org)|178.32.102.200|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1762125 (1.7M) [application/x-gzip]
Saving to: `namecoin_linux32.tgz'
100%[====================================================================================================>] 1,762,125 1.43M/s in 1.2s
{
"users": {
"root": {
"configs": {
"ajenti.plugins.notepad.notepad.Notepad": "{\"bookmarks\": []}",
"ajenti.plugins.fm.fm.FileManager": "{\"root\": \"/\"}",
"ajenti.plugins.terminal.main.Terminals": "{\"shell\": \"sh -c $SHELL || sh\"}",
"ajenti.plugins.dashboard.dash.Dash": "{\"widgets\": [{\"index\": 0, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.dashboard.welcome.WelcomeWidget\"}]}"
},
"password": "password",
"map": {
"*": { "alias" : "www.mationn.com." }
}