Skip to content

Instantly share code, notes, and snippets.

View kitchen's full-sized avatar
🚴‍♂️
traveling the world

Jeremy Kitchen kitchen

🚴‍♂️
traveling the world
View GitHub Profile
@kitchen
kitchen / description.txt
Last active December 23, 2015 00:49 — forked from vjt/description.txt
Originally posted on http://pastie.org/pastes/26489 (8 December 2006)
COPY FROM STDIN / LOAD DATA INFILE method for Rails PostgreSQL and MySQL Adapters.
The mysql adapter is completely untested. It is self-explanatory, isn't it? :)
Public domain, or DWTFWYW License, at your option.
[email protected]
#!/usr/bin/perl
# gitweb - simple web interface to track changes in git repositories
#
# (C) 2005-2006, Kay Sievers <[email protected]>
# (C) 2005, Christian Gierke
#
# This program is licensed under the GPLv2
use 5.008;
@kitchen
kitchen / README.md
Created September 1, 2012 03:11 — forked from vanto/README.md
OEmbed Liquid Tag for Jekyll

OEmbed Liquid Tag for Jekyll

This is a simple liquid tag that helps to easily embed images, videos or slides from OEmbed enabled providers. It uses Magnus Holm's great oembed gem which connects to the OEmbed endpoint of the link's provider and retrieves the HTML code to embed the content properly (i.e. an in-place YouTube player, Image tag for Flickr, in-place slideshare viewer etc.). By default it supports the following OEmbed providers (but can fallback to Embed.ly or OoEmbed for other providers):

  • Youtube
  • Flickr
  • Viddler
  • Qik
  • Revision3
  • Hulu
  • Vimeo
#perl
grep { !($_ % 2) } (1,2,3,4)
#ruby
[1,2,3,4].select{ |x| x.even? }
#python
[x for x in [1,2,3,4] if not x%2]
#or, more norvingly
filter(lambda x: not x%2, [1,2,3,4])