Skip to content

Instantly share code, notes, and snippets.

View impronunciable's full-sized avatar

Dan Zajdband impronunciable

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc,char *argv[]) {
int charcount = 0;
float timecount = 0; /* number of characters seen */
FILE *in_file; /* input file */
$(document).ready(function(){
$('#s,label[for=s]').hide();
var sel_list = $('<div id="sel_list"><strong><span></span></strong><ul></ul></div>');
sel_list.find('span').text($('label[for=s]').text());
$('#s').children('option').each(function(){
sel_list.children('ul').append('<li>' + $(this).text() + '</li>');
});
$('#s').after(sel_list);
$('#peron').click(function(e){
e.preventDefault();
$('#ul1 li').each(function(){
var img = $('<img />');
img.attr('src', $(this).attr('href' );
$(this).before(img);
$(this).remove();
});
});
$('#peron').click(function(e){
e.preventDefault();
$('#ul1 li a').each(function(){
var img = $('<img />');
$(img).attr('src', $(this).attr('href'));
$(this).before(img);
$(this).remove();
});
});
'POST /api/v1/user/ HTTP/1.1\r\nContent-Type: application/json\r\nAccept: application/json\r\nContent-Length: 121\r\nHost: 127.0.0.1:8000\r\nConnection: keep-alive\r\n\r\n{"method":"facebook","method_id":"123123213123","username":"REPTARRRR","name":"Aventuras en pañales","password":"123456"}'
@impronunciable
impronunciable / gist:1724963
Created February 2, 2012 18:22
vulsai counter
;(function ( $, window, document, undefined ) {
var defaults = {
start: 0
, update_interval: 2000
, stop: false
, stop_at: 600000
, min_count: 1
, max_count: 5
};
@impronunciable
impronunciable / select-to-dropdown.js
Created February 6, 2012 19:02 — forked from ignacioricci/select-to-dropdown.js
Change select to dropdown list
var select_to_dropdown = function(el, dropdown, select_text ){
$(el).children().hide();
var sel_list = $('<div id="'+dropdown+'"><strong class="cta"><span></span></strong><ul></ul></div>');
sel_list.find('span').text($(el + ' label').text());
$(el + ' select').children('option').each(function(){
sel_list.children('ul').append('<li>' + $(this).text() + '</li>');
});
$(el).append(sel_list);
$(dropdown).find('li').live('click',function(e){
$(el + ' select option').eq($(this).index()).attr('selected','selected').siblings('option').removeAttr('selected');
var Tuiter = require('tuiter')
, redis = require('redis');
var t = new Tuiter({
"consumer_key" : "your consumer key"
, "consumer_secret" : "your consumer secret"
, "access_token_key" : "your access token key"
, "access_token_secret" : "your access token secret"
});
@impronunciable
impronunciable / givememoney.js
Created May 3, 2012 17:14
The way every web developer should ask for a raise
var redis = require('redis')
, Tuiter = require('tuiter');
var client = redis.createClient();
// your twitter api credentials
var t = new Tuiter({
"consumer_key" : "blablabla"
, "consumer_secret" : "blablabla"
, "access_token_key" : "blablabla"
var tuiter = require('tuiter')(keys);
var getTweets = function(screen_name, max_id) {
tuiter.userTimeline({screen_name: screen_name, max_id: max_id}, function(err, tweets){
//save tweets
//get more
if(tweets.length)
getTweets(screen_name, tweets[tweets.length - 1].id - 1);