Skip to content

Instantly share code, notes, and snippets.

@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@bkendzior
bkendzior / .cowsayfortune
Created January 9, 2013 02:41
Have a random cow tell you fortunes
# Have a random cow tell you fortunes
function cowsayfortune {
NUMOFCOWS=`cowsay -l | tail -n +2 | wc -w`
WHICHCOW=$((RANDOM%$NUMOFCOWS))
THISCOW=`cowsay -l | tail -n +2 | sed -e 's/\ /\'$'\n/g' | sed $WHICHCOW'q;d'`
#echo "Selected cow: ${THISCOW}, from ${WHICHCOW}"
fortune | cowsay -f $THISCOW -W 100
}
@jD0T
jD0T / AutoHotkey.sublime-build
Created October 14, 2012 17:55
AutoHotkey pack to use with Sublime Text 2
{
"cmd": ["/AutoHotkey/App/AutoHotkey.exe", "/ErrorStdOut", "$file"],
"file_regex": "^[ ]*File \"(...*?)\",\nline ([0-9]*)",
"selector": "source.ahk",
"working_dir": "$file_path"
}
@pasela
pasela / README.md
Created August 22, 2012 06:18
mintty: A soft pastel color theme(xoria256) for mintty

A soft pastel color theme for mintty

This is ported version of color theme xoria256.

screenshot

Settings

Merge mintty-color-xoria256-rc into your .minttyrc

@pasela
pasela / README.md
Created August 21, 2012 07:03
mintty: A pastel color theme for mintty

A pastel color theme for mintty

screenshot

Settings

Merge mintty-color-pastel-rc into your .minttyrc

or

@pasela
pasela / export-mintty-color.rb
Created August 21, 2012 06:17
Convert .minttyrc color settings to escape sequences.
# encoding: utf-8
# Convert .minttyrc color settings to escape sequences.
#
# USAGE:
# ruby export-mintty-color.rb [minttyrc_file]
#
# minttyrc_file target rc file(default is ~/.minttyrc)
COLOR_SETTINGS = {
@johannesnagl
johannesnagl / Tweetsheets
Created August 9, 2012 10:25
Use Twitter directly in your Google Doc, so no one will ever blame you for being social
var CONSUMER_KEY = "<< YOUR KEY HERE >>";
var CONSUMER_SECRET = "<< YOUR SECRET HERE >>";
function getConsumerKey() {
return CONSUMER_KEY;
}
function getConsumerSecret() {
return CONSUMER_SECRET;
}
@valpackett
valpackett / ohlife_to_evernote.py
Created July 19, 2012 13:28
OhLife to Evernote importer
# works only on Mac OS X with Evernote desktop client installed
# download the ohlife plaintext export and pipe it to this script
# eg. $ cat ~/Downloads/ohlife_2012blablabla.txt | python ohlife_to_evernote.py
# don't forget to change the notebook title if it's not "Journal"
from pipes import quote
import sys
import os
buf = ''
@bentruyman
bentruyman / Custom.less
Created July 3, 2012 15:55
Tomorrow Theme for Chrome Developer Tools
/**********************************************/
/*
/* Tomorrow Skin by Ben Truyman - 2012
/*
/* Based on Chris Kempson's Tomorrow Theme:
/* https://github.com/ChrisKempson/Tomorrow-Theme
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*