Skip to content

Instantly share code, notes, and snippets.

import sys
import subprocess
import tempfile
import urllib
text = sys.stdin.read()
chart_url_template = ('http://chart.apis.google.com/chart?'
'cht=qr&chs=300x300&chl={data}&chld=H|0')
chart_url = chart_url_template.format(data=urllib.quote(text))
@clouddueling
clouddueling / feed.php
Last active December 14, 2015 03:29
Long pulling with Laravel
<?php
class Feed_Controller extends Base_Controller
{
public $layout = 'layouts.feed';
public function get_index()
{
$records = Record::where_deleted(0)
->order_by('updated_at', 'desc')
@ryandotsmith
ryandotsmith / hack-reactor.md
Last active November 24, 2022 07:01
Hack Reactor Talk

Tales From a Heroku User

Here are some things I have learned along the way.

Last Updated: 2013-02-08

Original Audience: Hack Reactor

About

@mburst
mburst / jquery_autocomplete.html
Created January 19, 2013 20:51
jQuery Autocomplete
<!DOCTYPE html>
<html>
<head>
<title>jQuery Autocomplete</title>
<style>
#res {
margin: 0px;
padding-left: 0px;
width: 150px;
}
@damilare
damilare / cleanup.py
Last active April 3, 2020 00:17
Tweeting is like real world conversations. People don't usually record what they say, so it might be a good idea to clean-up your tweets every now and then.
""" 1) Download python twitter library from https://github.com/sixohsix/twitter
2) Go to dev.twitter.com creaate an application and genenrate tokens
3) Setup your tokens below
4) python cleanup.py and your tweets are gone!
"""
from twitter import *
t = Twitter(
auth=OAuth('--your-access-token-here',
<input type="button" onclick="(function(btn){var z=document.createElement('script');document.subtomeBtn=btn;z.src='https://www.subtome.com/load.js';document.body.appendChild(z);})(this)" value="Subscribe">
@SeanJA
SeanJA / GIFEncoder.class.php
Last active November 8, 2021 17:39
dynamic animated gif clock
<?php
/*
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Formerly known as:::
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu
::
:: This class is a rewritten 'GifMerge.class.php' version.
::
:: Modification:
@dylanroy
dylanroy / pictures.markdown
Created August 29, 2012 17:19 — forked from sent-hil/pictures.markdown
River (getriver.com): Keep a programming journal.

One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.

At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:

  • Todo
  • Question
  • Thought
  • Bug
  • Feature
@SamSaffron
SamSaffron / Async.cs
Created June 7, 2012 06:13
Async class for threading
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Threading;
using System.Diagnostics;
using System.Text;
namespace StackOverflow.Helpers
@thehydroimpulse
thehydroimpulse / gist:2872907
Created June 5, 2012 05:42
A Laravel task generator. Models, Migrations and Controllers.
<?php
/**
* @copyright 2012 TheHydroImpulse, Daniel Fagnan
* @version 0.1
* @todo Add an overwite ability. Among other things.
* @note Use this as you wish. Extend it, Mash it. Enjoy it.
*/