Skip to content

Instantly share code, notes, and snippets.

@obfusk
obfusk / break.py
Last active May 1, 2024 20:32
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use https://docs.python.org/3/library/pdb.html
import code; code.interact(local=dict(globals(), **locals()))
@landonf
landonf / 0_data_prettyprint.json
Created October 19, 2014 23:00
In Yosemite, all Safari web searches are sent to not only the search engine you've selected (e.g., Google, DuckDuckGo), but *also* to Apple, even if you've disabled "Spotlight Suggestions" (System Preferences > Spotlight Suggestions, as per Apple's privacy documentation) and sharing of Usage and Diagnostics data. https://github.com/fix-macosx/yo…
[
{
"timestamp": 0,
"input": "W",
"type": "search_local",
"latency": 0
},
{
"local_results": [
"ddg_search",
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing

Install

npm install funcoffee

Require

require('funcoffee').expose global

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Homebrew

First you'll need to install the [Homebrew package manager][brew] if yo haven't already. It is amazing.

@spo11
spo11 / init.el
Created September 17, 2013 18:03
My init.el
;; File: init.el
;; Author: A.J.
;; PeepOpen and Textmate configuration for fuzzy-file-finding
;; Emacs-starter-kit by technomancy
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@gnarmis
gnarmis / yummly-api.clj
Last active December 14, 2015 17:59
Yummly API
(defn yummly-api [auth]
{:endpoint "http://api.yummly.com/v1"
:resources {:recipe-search "/api/recipes"}
:params ["q", "requirePictures", "allowedIngredient[]", "excludedIngredient[]",
"allowedDiet[]", "allowedAllergy[]", "allowedCuisine[]",
"allowedCourse[]", "allowedHoliday[]", "excludedCuisine[]",
"excludedCourse[]", "excludedHoliday[]", "maxTotalTimeInSeconds",
"nutrition.ATTR.{min|max}", "maxResult", "start",
"flavor.ATTR.{min|max}", "facetField[]"]
:auth {"_app_id" (:app-id auth),
@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>
@spikegrobstein
spikegrobstein / resque-failed-iterator.rb
Created December 11, 2012 23:35
iterate through resque failed jobs
1.upto(Resque::Failure.count) do |i|
job = Resque::Failure.all(i)
# inspect failed job
args = job['payload']['args']
klass = job['payload']['class']
end