Skip to content

Instantly share code, notes, and snippets.

fasdgfs dfgsd
vsdf
gsfg
sdf
gs
dfg
sdfg
sdfg
sdf
brew install wget tig rbenv ruby-build jq git vim
@naudo
naudo / Gemfile
Created May 9, 2015 16:12
React + Rails Config
source 'https://rubygems.org'
ruby '2.1.3'
gem 'rails', '4.1.5'
gem 'pg', '~> 0.17.1'
gem 'sass-rails', '~> 4.0.3' # Use SCSS for stylesheets
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets
gem 'jquery-rails' # Use jquery as the JavaScript library
gem 'jbuilder', '~> 2.0' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
@naudo
naudo / gist:7dece3a169298def46a2
Last active August 29, 2015 14:17
Install things
# install brew
brew install tig wget git ruby-build rbenv python
rbenv install 2.2.1 && rbenv global 2.2.1
pip install virtualenv
@naudo
naudo / osx_mavericks_output.html
Created October 13, 2014 20:35
TermRecord Output debugging
<html>
<head>
<!-- term.js released and distributed under the MIT License; Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/) -->
<script>(function(){var i=this,p=this.document;function h(){this._events=this._events||{}}h.prototype.addListener=function(y,z){this._events[y]=this._events[y]||[];this._events[y].push(z)};h.prototype.on=h.prototype.addListener;h.prototype.removeListener=function(z,A){if(!this._events[z]){return}var B=this._events[z],y=B.length;while(y--){if(B[y]===A||B[y].listener===A){B.splice(y,1);return}}};h.prototype.off=h.prototype.removeListener;h.prototype.removeAllListeners=function(y){if(this._events[y]){delete this._events[y]}};h.prototype.once=function(z,A){function y(){var B=Array.prototype.slice.call(arguments);this.removeListener(z,y);return A.apply(this,B)}y.listener=A;return this.on(z,y)};h.prototype.emit=function(B){if(!this._events[B]){return}var z=Array.prototype.slice.call(arguments,1),C=this._events[B],y=C.length,A=0;for(;A<y;A++){C[A].
/** @jsx React.DOM */
var Child = React.createClass({
onNew: function(){
console.log("child clicked")
this.props.onClick()
},
render: function() {
@naudo
naudo / angular-post-render
Created August 1, 2014 22:21
Angular.js help
````html
<div ng-controller="TodoItemController">
<div class="thing" ng-repeat="thing in things" rebind-draggable-directive>
thing {{thing}}
</div>
</div>
````
````javascript
angular.module('myApp', [])
+#!/usr/bin/env bash
+
+#setup the pg database server
+wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add -
+mkdir /etc/apt/sources.list.d
+touch /etc/apt/sources.list.d/pgdg.list
+
+echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/pgdg.list
+
+apt-get update
func main() {
port := os.Getenv("PORT")
if len(port) == 0 {
port := "4000"
}
log.Fatal(http.ListenAndServe(":"+ port, nil))
}
# super, what is it?
# object comparision
# - why doesn't p1 == p2?
# - memory location (id) vs our perceived idea of equality
# __eq__ == dangerzone!!!!
# there will be bugs
#
class Pet(object):