Skip to content

Instantly share code, notes, and snippets.

@kaiwren
kaiwren / net_http_debug.rb
Created September 22, 2010 12:48
Enable debug for all Ruby HTTP requests
require 'net/http'
module Net
class HTTP
def self.enable_debug!
raise "You don't want to do this in anything but development mode!" unless Rails.env == 'development'
class << self
alias_method :__new__, :new
def new(*args, &blk)
instance = __new__(*args, &blk)
instance.set_debug_output($stderr)
@d-imal
d-imal / hack.sh
Created March 31, 2012 19:25 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
define(["backbone", "backbone.marionette", "backbone.epoxy", "views/mixins/epoxyCustomBindingHandlers", "views/mixins/epoxyCustomBindingFilters"],
function(Backbone, Marionette, Epoxy, EpoxyCustomBindingHandlers, EpoxyCustomBindingFilters) {
// Base set of functions that can be mixed into standard views such as ItemViews, CompositeViews, etc.
return {
bindingHandlers: EpoxyCustomBindingHandlers,
bindingFilters: EpoxyCustomBindingFilters,
@thomas-jeepe
thomas-jeepe / FormGenerator.js
Last active October 12, 2015 18:46
FormGenerator, not for use so copy off of it
import React from 'react'
import { TextField, RaisedButton, FlatButton, Paper, Toggle, RadioButton, RadioButtonGroup, DropDownMenu } from 'material-ui'
//This is a HOC which adds required material-ui themes to the component
//You should be able to not use material-ui at all or add childContextTypes with the theme
import MuiComponent from '../containers/MuiComponent'
/*
You dont have to use these components so I recommened you change styles to you liking.
*/
let FormValues;

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?