Skip to content

Instantly share code, notes, and snippets.

text-rendering: optimizeLegibility;
/* that's it! */
def primeCheck(number) :
divisorList = range(1,(number +1))
for divisor in divisorList :
print str(number) + " divided by " + str(divisor) + " has a remainder of " + str(number%divisor)
primeCheck(7)
input, textarea, select {
-webkit-appearance: none;
}
@robertwalsh0
robertwalsh0 / coffeeCompile
Created September 13, 2012 22:56
Compile Javascript from Coffeescript in a Particular directory
coffee -c -w -o ../js application.coffee
@robertwalsh0
robertwalsh0 / fat arrow.coffee
Created February 17, 2013 19:44
Fat arrow?
firstname = "fatArrow other person"
bill =
firstname: 'skinnyArrow Bill'
lastname: 'williams'
skinnyArrow: -> console.log @firstname
fatArrow: => console.log @firstname
bill.skinnyArrow() #bound to the object in which it's called. hence it returns the firstname property of the "bill" object
@robertwalsh0
robertwalsh0 / duplicates_in_array.rb
Created February 18, 2013 17:35
Finding duplicates in an array ruby
a = ["A", "B", "C", "B", "A"]
a.detect{ |e| a.count(e) > 1 }
@robertwalsh0
robertwalsh0 / gist:5321815
Created April 5, 2013 19:10
Why this.getFooterView?
@ConversationClone.module "FooterApp.Show", (Show, App, Backbone, Marionette, $, _) ->
Show.Controller =
showFooter: ->
footerView = @getFooterView
getFooterView: ->
new Show.Footer
@robertwalsh0
robertwalsh0 / module_pattern.js
Last active December 16, 2015 07:19
Module pattern
var MODULE = (function () {
var my = {},
privateVariable = 1;
function privateMethod() {
// ...
}
my.moduleProperty = 1;
my.moduleMethod = function () {
@robertwalsh0
robertwalsh0 / module.js
Created May 10, 2013 03:43
module pattern
var myModule = (function($, undefined){
var myVar1 = '',
myVar2 = '';
var someFunction = function(){
return myVar1 + " " + myVar2;
};
return {
getMyVar1: function() { return myVar1; }, //myVar1 public getter
@robertwalsh0
robertwalsh0 / github.css
Created January 28, 2014 23:31
Github css
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {