Skip to content

Instantly share code, notes, and snippets.

Just to make sure that I have all of this understood...

On the client side the code will look something like the following on the constructor:

save: =>
  errors = validator.validateMeeting(@toJSON())
  return super if not errors
  # there were errors - handle them.
@adhipg
adhipg / me.sh
Created September 19, 2012 19:07 — forked from papercreatures/me.sh
rewrite locations to vim urls
node <script> 2>&1 | gist.sh
#!/bin/sh
sed -Ee "s#[(]?(/[^:]*/([^ ]*)):([0-9]+):([0-9]*)[)]?#[\2:\3:\4] mvim://open/?url=file://\1\&line=\3\&column=\4#g"
@adhipg
adhipg / gist:3818038
Created October 2, 2012 10:20
Delete all branches that have already been merged into currently checked out branch
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
@adhipg
adhipg / toggl.js
Created February 10, 2013 10:44
Returns a time formatted in H:mm if there is an active timer running in Toggl. I use this to add currently running timers to my `tmux-powerline`
#!/usr/bin/env node
var https = require('https');
var options = {
hostname: 'www.toggl.com',
path: '/api/v6/time_entries.json',
headers: {
'Content-Type': 'application/json'
},
auth: "YOUR_API_TOKEN:api_token"
};
{
"email": "Some email address documentation",
"email": "test@example.com",
"age": "some documentation about age",
"age": 23
}
set -g default-terminal "screen-256color"
set-option -g prefix C-a
unbind C-b
# Ensure that we can send Ctrl-A to other apps
bind C-a send-prefix
set -g status-keys vi

Keybase proof

I hereby claim:

  • I am adhipg on github.
  • I am adhipg (https://keybase.io/adhipg) on keybase.
  • I have a public key whose fingerprint is 5E62 8E26 72D6 C581 8F6F 33F5 AFB8 5A15 777F 6EF7

To claim this, I am signing this object:

{
"491289025" : "ijinshan-kappmarket://",
"301521403" : "fb103361823069955://",
"492178411" : "ils492178411://",
"346142396" : "fb234434003713://",
"310633997" : "whatsapp://",
"370614765" : "com.condenet.newyorker://",
"325058491" : "rnmddisco://",
"382952264" : "epichttp://",
"477048487" : "predictwind://",
@adhipg
adhipg / .gitignore
Created January 22, 2015 14:04
Ignore everything but a certain subdirectory
*
!.gitignore
!/wp-content
/wp-content/*
!/wp-content/themes
/wp-content/themes/*
!/wp-content/themes/raison-winetrust/