Skip to content

Instantly share code, notes, and snippets.

View duckinator's full-sized avatar

Ellen Marie Dash duckinator

View GitHub Profile
@duckinator
duckinator / dabblet.css
Created April 15, 2014 07:01 — forked from rummik/dabblet.css
Non-ducky Circular Thing
/**
* Non-ducky Circular Thing
*/
/**
* Duck.
*/
*, *:before, *:after {
-moz-box-sizing: border-box;
{
META_KEY => @document.meta,
LINKS_KEY => @document.links,
LINKED_KEY => @document.linked,
}.select {|k, v| v.any?}
@duckinator
duckinator / 5e.rb
Last active August 29, 2015 14:08 — forked from FluffyPira/5e.rb
#!/usr/bin/env ruby
roll1 = 4.times.map { rand(1..6) }.sort
roll2 = 4.times.map { rand(1..6) }.sort
roll3 = 4.times.map { rand(1..6) }.sort
roll4 = 4.times.map { rand(1..6) }.sort
roll5 = 4.times.map { rand(1..6) }.sort
roll6 = 4.times.map { rand(1..6) }.sort
roll1.reduce(:+) if roll1.size > 0
@duckinator
duckinator / variant.rb
Last active August 29, 2015 14:10 — forked from jneen/variant.rb
class Variant
attr_accessor :variant_tag
def self.variants(hsh)
hsh.map do |tag, args|
variant(tag, args)
end
end
def self.variant(tag, args)
function loadDoc(url, callback) {
// branch for native XMLHttpRequest object
try {
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = (function(){ processReqChange(req, callback); })
req.open("GET", url, true);
req.send(null);
// branch for IE/Windows ActiveX version
if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
if line =~ ' HTML 3\.2'
let b:html_omni_flavor = 'html32'
elseif line =~ ' XHTML 1\.1'
let b:html_omni_flavor = 'xhtml11'
else " two-step detection with strict/frameset/transitional
if line =~ ' XHTML 1\.0'
let b:html_omni_flavor = 'xhtml10'
elseif line =~ ' HTML 4\.01'
let b:html_omni_flavor = 'html401'
namespace Foo
{
class Bar : Controller
{
public ActionResult MyAction(int? id)
{
var ctx = new Models.MyDbContext();
return from x in ctx.MyTable where x.ID == id select x.Name;
}

Comments

  • /* */
  • //

Lambdas

[arg1 arg2]:

// code

|arg1|
|arg2|
|arg3|
(print (join "my god this is hideous..." arg1 arg2 arg3))
.
.
.
|arg1|
|arg2|
o/\oo/o/o/o/o/o/o/o/o/o/o/o/o/o/
o/o/o/o/\o/\o\oo/o/o/o/o/o/o/o/o/
o/o/o/o/o/o/o/o/o/\o\o/\o/\o\o/\oo/
\o/o/o/\oo/o/o/o/o/o/o/o/o/o/o/o/
o/o/\o/\o\oo/o/o/o/o/o/o/o/o/o/\o
\o/\o/\o\o/\oo/o/o/\o/o/o/o/o/o/o/o/
o/o/o/o/o/o/o/o/\o/o/\o/o/o/o/o/o/
o/o/\o/o/o/\oo/\oo/\oo/o/o/o/o/o/
o/o/o/o/o/o/o/o/o/o/\o/\o\oo/o/o/
o/o/o/o/o/o/o/\o\o/\o/\o\o/\oo/\o/o/