Skip to content

Instantly share code, notes, and snippets.

@jamesgecko
jamesgecko / Links in markdown.md
Last active Dec 21, 2018 — forked from jesstelford/Links in markdown.md
Putting links in code blocks on GitHub
View Links in markdown.md
@jamesgecko
jamesgecko / init.lua
Created Nov 1, 2016 — forked from rjhilgefort/init.lua
Hammerspoon config to send escape on short ctrl press
View init.lua
local sendEscape = true
local ctrlKeyTimer = hs.timer.delayed.new(0.15, function()
sendEscape = false
end)
local lastMods = {}
local flagsChangedHandler = function(event)
local newMods = event:getFlags()
if lastMods.ctrl == newMods.ctrl then return false end
View Learn to program.markdown

Learn to Program

I want awesome general purpose development tools

  • Atom is the best easy-to-learn free text editor right now.
  • Git is a great versioning tool with a somewhat confusing interface.
  • ConEmu is a nice Windows command line replacement when you eventually get sick of the default one.

I want to learn practical Python stuff

View application.js
$('.submittable').live('change', function() {
$(this).parents('form:first').submit();
});
@jamesgecko
jamesgecko / winmanager.rb
Created Jan 30, 2012 — forked from mdnmdn/winmanager.rb
ironruby ActiveDirectory access
View winmanager.rb
require 'System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
include System::DirectoryServices
class WinManager
attr_accessor :connection_string
if !defined? FLAG_CANNOT_CHANGE_PASSWORD
FLAG_CANNOT_CHANGE_PASSWORD = 0x40
FLAG_PASSWORD_NEVER_EXPIRES = 0x10000
View mod_set_presence_rest.lua
-- Recive a HTTP POST and relay it
-- Author: Waqas Hussain
-- Derived from mod_post_msg by Kim Alvefur <zash@zash.se>
-- Some code borrowed from mod_webpresence
--
-- Example usage:
-- curl http://example.com:5280/presence/user -d "Hello there"
-- or
-- curl http://example.com:5280/presence/user@example.com -d "Hello there"