Skip to content

Instantly share code, notes, and snippets.

View priithaamer's full-sized avatar

Priit Haamer priithaamer

View GitHub Profile
@priithaamer
priithaamer / gist:1205633
Created September 9, 2011 06:45
Loads jQuery if not loaded
(function() {
var $;
if (window.jQuery === undefined || window.jQuery.fn.jquery < '1.5') {
(function(d, t) {
var js = document.createElement(t);
js.src = location.protocol + '//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js';
js.onload = scriptLoadHandler;
js.onreadystatechange = function() {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
@priithaamer
priithaamer / gist:4017203
Created November 5, 2012 13:32
Goes to /System/Library/Input Methods/PressAndHold.app/Contents/Resources/Keyboard-et.plist
<key>Roman-Accent-q</key>
<dict>
<key>Direction</key>
<string>right</string>
<key>Keycaps</key>
<string>q ` ^ ⌥ ⇧ ⌘ ⎋ ⏏ ⌫ ↑ ⇡ ↖ ⇞ ⇥</string>
<key>Strings</key>
<string>q ` ^ ⌥ ⇧ ⌘ ⎋ ⏏ ⌫ ↑ ⇡ ↖ ⇞ ⇥</string>
</dict>
@priithaamer
priithaamer / config.ru
Created October 21, 2010 09:30
Gollum rackup script
#!/usr/bin/ruby
require 'rubygems'
require 'gollum/frontend/app'
system("which git") or raise "Looks like I can't find the git CLI in your path.\nYour path is: #{ENV['PATH']}"
gollum_path = '/Users/priit/Documents/Fraktal/Wiki'
disable :run

Keybase proof

I hereby claim:

  • I am priithaamer on github.
  • I am priithaamer (https://keybase.io/priithaamer) on keybase.
  • I have a public key ASDIqb054fIDinsrc9Ih1p8vOm1KL6d_Dzh7lE5QZG-jogo

To claim this, I am signing this object:

@priithaamer
priithaamer / deck.gl.d.ts
Last active May 15, 2018 19:10
Partial implementation of deck.gl TypeScript definitions
declare module 'deck.gl' {
import * as React from 'react';
type HandlerInfo<T> = (info: { layer: BaseLayer<T>, index: number, object: T, x: number, y: number }) => boolean;
interface BaseLayerOptions<T> {
id?: string;
data?: T[];
@priithaamer
priithaamer / gist:1034070
Created June 19, 2011 11:01
Capistrano task to ask confirmation before deploying to production
task :ask_production_confirmation do
set(:confirmed) do
puts <<-WARN
========================================================================
WARNING: You're about to perform actions on production server(s)
Please confirm that all your intentions are kind and friendly
========================================================================