Skip to content

Instantly share code, notes, and snippets.

Greg Leuch gleuch

Block or report user

Report or block gleuch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:830432
#!/bin/sh
#
# branch [branchname]
#
# Create a new local AND remote git branch
# Setup local branch to use remote tracking
#
branch=$1
if [ -z $branch ]; then
View gist:649975

1. How difficult is it for you to find specific images on the internet for your projects?
Sometimes difficult, but with meme research, I’ve got a list of sites I haunt.

2. Would it be helpful for you to see how other users have rated images you are considering?
Yes. Virality is also important, such as # views, where it has been used, etc.

3. How important is it for you to be able to find high-resolution images?
Yes.

4. Would you be willing to share your own images for free or for a fee?

View gist:312452
failed: "sh -c 'if [ -d /home/rb/magma/shared/cached-copy ]; then cd /home/rb/magma/shared/cached-copy && git fetch origin && git reset --hard 43afd09f510a4c114acc27a45e465fd06b7610dd && git submodule init && for mod in `git submodule status | awk '\\''{ print $2 }'\\''`; do git config -f .git/config submodule.${mod}.url `git config -f .gitmodules --get submodule.${mod}.url` && echo Synced $mod; done && git submodule sync && git submodule update && git clean -d -x -f; else git clone git@github.com:rocketboom/magma.git /home/rb/magma/shared/cached-copy && cd /home/rb/magma/shared/cached-copy && git checkout -b deploy 43afd09f510a4c114acc27a45e465fd06b7610dd && git submodule init && git submodule sync && git submodule update; fi'" on db01.mag.ma,worker01.mag.ma:222
View gist:283354
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>
hi
</title>
<script language="JavaScript" type="text/javascript">
<!--
function Add(href) {
WebRing[++NumInWebRing] = new WebRingObject(href);
View gist:191613
using config file '/usr/local/src/magma/git/config/development.sphinx.conf'...
creating server socket on 127.0.0.1:3320
WARNING: index 'user_core': preload: failed to open /usr/local/src/magma/git/db/sphinx/development/user_core.sph: No such file or directory; NOT SERVING
WARNING: index 'user_delta': preload: failed to open /usr/local/src/magma/git/db/sphinx/development/user_delta.sph: No such file or directory; NOT SERVING
WARNING: index 'user': no such local index 'user_delta' - SKIPPING LOCAL INDEX
WARNING: index 'user': no such local index 'user_core' - SKIPPING LOCAL INDEX
WARNING: index 'user': no valid local/remote indexes in distributed index - NOT SERVING
WARNING: index 'video_core': preload: failed to open /usr/local/src/magma/git/db/sphinx/development/video_core.sph: No such file or directory; NOT SERVING
WARNING: index 'video_delta': preload: failed to open /usr/local/src/magma/git/db/sphinx/development/video_delta.sph: No such file or directory; NOT SERVING
WARNING: index 'video': no such local i
View gist:188790
ActionController::RoutingError (video_in_channel_url failed to generate from {:action=>"show", :channel_id=>nil, :controller=>"videos", :id=>#<Video id: 6512, url: "http://www.youtube.com/watch?v=c-7U7rjBi_Q", title: "http://www.youtube.com/watch?v=c-7U7rjBi_Q", thumbnail: "http://img.youtube.com/vi/c-7U7rjBi_Q/0.jpg", description: nil, created_at: "2009-03-06 23:57:50", creator_id: nil, updated_at: "2009-09-17 01:09:12", updater_id: nil, cached_tag_list: nil, percentile: nil, service_id: "c-7U7rjBi_Q", service: nil, source: nil, embed: nil, points: nil, score: 6.3, slug: "", active: true, identified: nil, identified_at: nil, nsfw: false, comments_count: 0, likes_count: 0, published_at: nil, queued_at: "2009-08-20 23:54:27", channel_videos_count: 1, featured_at: nil, never_feature: false, featured_by: nil, slug_token: nil>}, expected: {:action=>"show", :controller=>"videos"}, diff: {:channel_id=>nil, :id=>#<Video id: 6512, url: "http://www.youtube.com/watch?v=c-7U7rjBi_Q", title: "http://www.youtube.com/watch
View gist:174821
*Magma Open to the Public*
Today marks a big day for Magma — our website is now officially open to everyone.
We owe a large thanks to the nearly five thousand beta users. Their wonderful suggestions and feedback were invaluable during our three month beta period. During that time, we have collected over 65,000 videos, millions of rows of video statistics, and ------.
Of course, a big thanks also goes out to our wonderful team: Andrew Baron, Jamie Wilkinson, Kenyatta Cheese, Greg Leuch, and Todd Persen.
View gist:137738
*Must Watch*
Magma was created for you to explore, discover, collect, share, and track videos from all over the internet.
Every video on Magma is given a score of 1 - 11. This score is an indication of how
popular the video has become, determined by the amount of social buzz, distrubution,
and view counts.
The Magma homepage is an aggregation of various channels and group that display what
is upcoming and popular across the web. The Must Watch area is a collection of upcoming
View jquery.sniffVisited.js
// Sniff out visited links by a user with jQuery
// by Greg Leuch <http://www.gleuch.com>
// based on an initial idea from Jonathan Snook <http://snook.ca>
// idea: <http://twitter.com/snookca/status/1121377463>
// Note: Only works if user has browser history enabled (save history for x >0 days)
// Edit: looks like my code mimics same idea that Aza Raskin's SocialHistory.js does, sans iframe and visit color matching. <http://www.azarask.in/blog/post/socialhistoryjs/>
View gist:114567
// adapted from jquery.com
// Hehe.
if ( window.addEventListener ) {
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
window.addEventListener("keydown", function(e){
kkeys.push( e.keyCode );
if ( kkeys.toString().indexOf( konami ) >= 0 ) {
// Just replace www.google.com w/ whatever
window.location = "http://www.google.com";
You can’t perform that action at this time.