Skip to content

Instantly share code, notes, and snippets.

View gaybro8777's full-sized avatar
💭
Im not gay. I'm just getting back at my dad for not getting me an xbox

Michael Corrado gaybro8777

💭
Im not gay. I'm just getting back at my dad for not getting me an xbox
View GitHub Profile
@colinmollenhour
colinmollenhour / Data.php
Created May 17, 2012 02:45
Zend_Locale_Data local caching fix.
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
@Jxck
Jxck / fizzbuzz.js
Created May 30, 2012 02:59
tdd sample with fizzbuzz
DEBUG = TEST = false;
function fizzbuzz(n) {
if(n % 15 === 0) return "FizzBuzz";
if(n % 3 === 0) return "Fizz";
if(n % 5 === 0) return "Buzz";
return n;
}
function main() {
@Jxck
Jxck / index.js
Created August 25, 2012 08:12
implement calculator by js with BNF parser
DEBUG = false;
TEST = true;
noop = function() {};
log = assert = noop;
if (DEBUG) {
log = console.log.bind(console);
}
if (TEST) {
assert = function(a,b,m) { console.assert(a.toString() === b.toString(), m); };
@Jxck
Jxck / manifest.json
Created September 29, 2012 03:02
Chrome Socket API Server
{
"manifest_version": 2,
"name": "Chrome Socket API Server",
"description": "listen & accept for socket",
"version": "0.1",
"app": {
"background": {
"scripts": ["server.js"]
}
},
@colinmollenhour
colinmollenhour / imap_learn.sh
Created November 21, 2012 21:10
IMAP Learn
#!/bin/bash
#
# IMAP Learn
#
# Copyright 2012 Colin Mollenhour (http://colin.mollenhour.com)
#
###############################################################################
#
# This script allows you to use an imap account to train your spamassassin server.
# Example script:
@jxe
jxe / Internet of Meaning.md
Created November 11, 2013 17:18
Internet of Meaning DRAFT spec

Editor, Joe Edelman

Abstract: New protocols and data exchange formats are presented to address issues in link recommendation and “feeds” relevant to users' social, location-based, and time-based situations. The aim is to create a broader, more inclusive, and more user-driven ecosystem around recommender systems and feeds. A new HTTP header ("X-Situation") is proposed, along with a cryptographic proof format ("application/relevance-claim+json") for content providers / activity providers to publish traffic and review data that establishes contextual relevance for use by recommenders. Political avenues for achieving adoption are discussed. One application regards an open web response to facebook newsfeed. (v0.3.3, parts still naive)

Intro, re: Keeping the Internet from Becoming Like TV

Empowering uses of the web—like Kickstarter and DIY.org—are growing fast, but television- and tabloid-like uses—YouTube, BuzzFeed—are growing even faster. Which will colonize mo

@kingofhawks
kingofhawks / gist:7748752
Last active June 10, 2021 06:38
Add text to existing image with C# and merge with another image file
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
@kingofhawks
kingofhawks / screen_phantomjs.js
Last active April 21, 2019 12:51
Use phantomjs to automatically do screenshot for web pages
var page = require('webpage').create();
page.viewportSize = { width: 500, height: 300 };
page.open('http://github.com/', function() {
//page.render('github.png');
page.render('github.pdf');//support PDF render also
phantom.exit();
});
@kingofhawks
kingofhawks / pandas_max_column.py
Created February 26, 2014 08:47
pandas to get column max value
import pandas
import numpy as np
df = pandas.DataFrame(np.random.randn(5,3),columns=['A','B','C'])
df
df['A'].argmax()
df['A'].max()
@christiangalsterer
christiangalsterer / README.md
Last active May 12, 2023 14:20
Dashing Jira Agile Sprint Remaining Widget