Skip to content

Instantly share code, notes, and snippets.

View benatkin's full-sized avatar

Benjamin Atkin benatkin

View GitHub Profile
such combinator much lambda
quiet
Y = λf.(λx.f (x x)) (λx.f (x x))
loud
such y much f
very a is plz f with f
wow a
such x much f
such z with x
very b is plz f with f
@aaronpk
aaronpk / Makefile
Last active December 20, 2015 10:39
me:
ifeq ($(USER), root)
@echo "\c"
else
@echo "make \c"
endif
a:
ifeq ($(USER), root)
@echo "\c"
@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
@tvandervossen
tvandervossen / gist:1605091
Created January 13, 2012 08:32
Deployment to S3 with CloudFront invalidation using s3cmd 1.1 beta
Sync local-public-dir to bucket-name on S3 and invalidate changed files on CloudFront:
$ ./bin/s3cmd-1.1.0-beta1/s3cmd -c s3.config sync local-public-dir/ s3://bucket-name/ --acl-public --cf-invalidate --rexclude '.svn' --rexclude '.DS_Store'
You can create s3.config with:
$ s3cmd --configure
I keep my s3.config on an encrypted disk image which I mount manually when needed.
@ahoward
ahoward / just-gimme-a-damn-uuid.rb
Created December 2, 2011 22:49
just gimme a damn uuid
{
'ffi-uuid' => proc{|*args| FFI::UUID.generate_time.to_s},
'uuid' => proc{|*args| UUID.generate.to_s},
'uuidtools' => proc{|*args| UUIDTools::UUID.timestamp_create.to_s}
}.each do |lib, implementation|
begin
@zdennis
zdennis / snippet.rb
Created September 22, 2011 15:45
Rails 3.1 Engine namespaces can creep into URLs in application layout
# the following route generated in an application layout
link_to "Foo", :controller => "foo", :action => "bar"
# when rendered from the action of an engine would
# try to generate the route
link_to "Foo", :controller => "myengine/foo", :action => "bar"
@HatemMahmoud
HatemMahmoud / Ubuntu rbenv
Created September 7, 2011 12:56
Installing Ruby 1.9.2 with OpenSSL on Ubuntu 11.04 using ruby-build and rbenv
# for more info: https://gist.github.com/1120938
@ryancrum
ryancrum / jquerytest.cljs
Created July 21, 2011 02:24
How to use jQuery from ClojureScript
(ns jquerytest.core)
(def jquery (js* "$"))
(jquery
(fn []
(-> (jquery "div.meat")
(.html "This is a test.")
(.append "<div>Look here!</div>"))))
@mcmire
mcmire / db_related_rails_tasks.md
Created January 19, 2011 22:28
Useful database-related tasks in Rails