Skip to content

Instantly share code, notes, and snippets.

View skopp's full-sized avatar

Rashaad Essop skopp

View GitHub Profile
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cork - virtual pinboard</title>
<link rel="stylesheet" type="text/css" href="styles/main.css">
<link rel="stylesheet" type="text/css" href="styles/jquery.ui.css">
</head>
require 'wuclan/models/tweet/tweet_token'
require 'wukong/encoding'
module Wuclan::Models
Tweet.class_eval do
def string_for_tokenizing
# simpleminded test for non-latin script: don't bother if > 20 entities
return if (text.count('&') > 20)
# skip default message from early days
return if (text =~ /just setting up my twttr/);
# return decoded, whitespace-flattened text
diff --git a/datasrc/content.py b/datasrc/content.py
index 7fe8f9b..988550d 100755
--- a/datasrc/content.py
+++ b/datasrc/content.py
@@ -233,6 +233,7 @@ image_particles = Image("particles", "particles.png")
image_game = Image("game", "game.png")
image_browseicons = Image("browseicons", "browse_icons.png")
image_emoticons = Image("emoticons", "emoticons.png")
+image_demobuttons = Image("demobuttons", "demo_buttons.png")
(function(){
print("Hello World!");
})();
@cookbooks
cookbooks / gist:731502
Created December 7, 2010 05:24
Grit clone example
# Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands:
require 'grit'
include Grit
gritty = Grit::Git.new('/tmp/filling-in')
gritty.clone({:quiet => false, :verbose => true, :progress => true, :branch => '37s'}, "git://github.com/cookbooks/cc-aws.git", "/tmp/cc-aws2")
# => "Initialized empty Git repository in /tmp/cc-aws2/.git/\n"
Dir.entries('/tmp/cc-aws2').size
# => 10
@remy
remy / gist:804414
Created January 31, 2011 17:24
Simple CSS parser
function parseCSS(str) {
function trim(str) {
return (str||'').replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
var i, j, k,
split = '}',
cur_key = '',
cur_key_split,
css = str.replace(/\t*/g, '').replace(/\s{2}/, ' ').replace(/[\n|\r]/g, ' ').replace(/\/\*.*?\*\//g, '').split(split),
@mdeiters
mdeiters / response.json
Created July 23, 2011 01:40
response from the coderwall api
http://coderwall.com/mdeiters.json
http://coderwall.com/mdeiters.json&callback=someMethod
@millisami
millisami / compiled-theme.html
Created December 14, 2011 05:08
Fumblr with Tumblr theme file
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lte-ie8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lte-ie8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lte-ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>Nepal on Rails</title>
@bguthrie
bguthrie / coderwall_badge_markup.html
Created January 9, 2012 22:47
An example of Coderwall badge integration.
<!-- Add these tags to the HEAD section of your page. -->
<link href="http://coderwall.com/stylesheets/jquery.coderwall.css" media="all" rel="stylesheet" type="text/css">
<script src="http://coderwall.com/javascripts/jquery.coderwall.js"></script>
<!-- You also need to place a container where you'd like the Coderwall badges to render. -->
<section class="coderwall" data-coderwall-username="(your username)" data-coderwall-orientation="(vertical or horizontal)"></section>
@cobbweb
cobbweb / fonts.css
Created February 3, 2012 05:02
Open Sans
/*==========================================================
Open Sans
==========================================================*/
@font-face {
font-family: 'OpenSans';
src: url('../fonts/OpenSans-Light-webfont.eot');
src: url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-Light-webfont.woff') format('woff'),
url('../fonts/OpenSans-Light-webfont.ttf') format('truetype'),