Skip to content

Instantly share code, notes, and snippets.

View khilnani's full-sized avatar

Nik Khilnani khilnani

View GitHub Profile
@atmos
atmos / heaven.md
Last active November 23, 2020 22:35
Response to a dude who asked about heaven. https://github.com/holman/feedback/issues/422

@holman got a request about our deployment system, heaven

I know it's not a high priority, but has there been any activity on open-sourcing the core Heaven gem?

There is. I've been working on extracting the non-GitHub specific parts into two gems. This first is a CLI portion called hades. The second is an HTTP API portion called heaven.

When you open source something previously used as in internal tool like Heaven, Hubot, Boxen, etc., how do you manage and hook in the parts that need to stay internal?

Normally I focus around four questions:

@shazron
shazron / ios7.phonegap.cordova.js
Last active June 9, 2025 07:29
PhoneGap / Apache Cordova - top margin for iOS 7
// Pre-requisites:
// 1. Device core plugin
// 2. Splashscreen core plugin (3.1.0)
// 3. config.xml: <preference name="AutoHideSplashScreen" value="false" />
// 4. config.xml: <preference name="DisallowOverscroll" value="true" />
function onDeviceReady() {
if (parseFloat(window.device.version) >= 7.0) {
document.body.style.marginTop = "20px";
// OR do whatever layout you need here, to expand a navigation bar etc
@edgauthier
edgauthier / dropboxlogin.py
Created September 5, 2013 04:00
dropboxlogin
# Based on https://gist.github.com/4034526
# Modified to prompt for app key/secret and store in keychain
# YOU NEED TO FILL IN YOUR APP KEY AND SECRET WHEN FIRST RUN!
# Go to dropbox.com/developers/apps to create an app.
# To reset app key & secret, change RESET_APP_SETTINGS to True and
# run this script. Remember to set it back out to False afterwards.
RESET_APP_SETTINGS = False
@edgauthier
edgauthier / DropboxSync.py
Last active December 22, 2015 04:19
DropboxSync
import os
import sys
import pickle
import console
import editor
from collections import namedtuple
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here: https://gist.github.com/edgauthier/6445941
@jbgo
jbgo / Vagrantfile
Created August 18, 2013 20:51
Getting started with ansible on OS X
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.33.10"
config.ssh.forward_agent = true
@alessaba
alessaba / prowl_sender.py
Last active December 20, 2015 22:28
prowl_sender
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Sender (for Mac OS X)
# For details, in Mac OS X Terminal type: man pbcopy
import subprocess, sys
import prowlpy
def getClipboardData(): # Only works for data types: {txt | rtf | ps}
p = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE)
@alessaba
alessaba / prowl_reciever.py
Last active December 20, 2015 22:28
prowl_reciever
import clipboard,sys
#you have to set Prowl's custom url to 'pythonista://prowl_reciever?action=run&args=hello%20world' where 'hello%20world is the notification text.
#I'll use argv to take advantage of the Pythonista's URL Scheme.
text=str(sys.argv[1]).replace('[space]',' ') #the [space] is a space
clipboard.set('')
clipboard.set(text)
print text #Remove after debug
@alessaba
alessaba / gist:6173177
Last active December 20, 2015 18:08 — forked from jwt2d/gist:6120070
# Launcher
#
# A Simple Launcher in Notification Center
from scene import *
import webbrowser,console,notification
#----------Launcher Settings---------------
key_names = [[['GChrome','googlechrome:'],
['Keeper','keeper:']],
[['Calculator','calculatorinfinity:']],
@BashedCrab
BashedCrab / HydrogenLayouts.py
Last active July 16, 2025 07:54
HydrogenLayouts
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#
@BashedCrab
BashedCrab / HydrogenDemo.py
Last active March 19, 2023 04:14
Demo of the Hydrogen GUI framework for Pythonista
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#