Skip to content

Instantly share code, notes, and snippets.

View ahmadvaroqua's full-sized avatar
😀

Ahmad Varoqua ahmadvaroqua

😀
View GitHub Profile
@ahmadvaroqua
ahmadvaroqua / TimeStream.sh
Created April 26, 2011 18:51
TimeStream aliases for bash
# Add a new task
tsn ()
{
curl -F "username=yourusername" -F "password=yourpassword" -F "task=$1" http://timestreamapp.com/api/task/add
}
# Get the current task
tsc ()
{
curl -G -d "username=yourusername" -d "password=yourpassword" http://timestreamapp.com/api/task/current
-- Save this file in ~/Library/Application Support/Quicksilver/Actions/
-- You may need to create the "Actions" folder if it's not there already
-- After you've saved it there, you need to restart Quicksilver:
-- Invoke quicksilver, then press: control+command+q
-- You should be good to go
using terms from application "Quicksilver"
on process text task
-- Add your tracker.vg username and password below
set ts_username to "yourusername"
#!/bin/sh
# Install by running the following in your home directory:
# curl https://gist.github.com/ahmadvaroqua/5685479/raw/c678e82487ba37193389e658a5851231f1645ef7/Configure+Vim | sh
# curl http://bit.ly/install-av-vim | sh
# May need to actually install vim as well:
# sudo aptitude install vim
# Go to the home directory
#!/bin/sh
# 2013-05-31 11:23:25 AV
# This will install vcprompt
# Go to the home directory
cd ~
# Create a bin folder if it doesn't already exist. This will not overwrite an exiting folder.
mkdir -p ~/bin;
@ahmadvaroqua
ahmadvaroqua / gist:7621491
Created November 23, 2013 23:45
Create a batch with Easypost.
require 'easypost'
EasyPost.api_key = 'YOUR API KEY HERE'
from_address = EasyPost::Address.create(
:name => 'EasyPost',
:street1 => '5128 Geary Blvd',
:city => 'San Francisco',
:state => 'CA',
:zip => '94118',
:country => 'US',
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ahmadvaroqua
ahmadvaroqua / CopyURL
Created May 6, 2016 22:04 — forked from kliker/CopyURL
Alfred app workflow: Get Safari current tab URL to clipboard
on alfred_script(q)
-- Copies URL of the current tab to the clipboard
-- Requires Alfred PowerPack
tell application "Safari"
set theURL to URL of front document
set the clipboard to theURL as string
end tell
end alfred_script
@ahmadvaroqua
ahmadvaroqua / planter.rb
Created May 13, 2016 20:56 — forked from ttscoff/planter.rb
Create directory trees from indented text input
#!/usr/bin/ruby
=begin
Planter v1.3
Brett Terpstra 2013
ruby script to create a directory structure from indented data.
Three ways to use it:
- Pipe indented (tabs or 2 spaces) text to the script
- e.g. `cat "mytemplate" | planter.rb
- Create template.tpl files in ~/.planter and call them by their base name
@ahmadvaroqua
ahmadvaroqua / index.html
Created September 13, 2017 17:06
Welcome to JS Bin // source http://jsbin.com/uXaqIMa/2
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.1/lodash.min.js"></script>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<meta charset=utf-8 />
<title>Welcome to JS Bin</title>
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Doppio+One' rel='stylesheet' type='text/css'>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>