Skip to content

Instantly share code, notes, and snippets.

View loisaidasam's full-sized avatar
🙌
🙌

Loisaida Sam loisaidasam

🙌
🙌
View GitHub Profile
~$ git clone -b release-4.12 git://github.com/echonest/echoprint-codegen.git
Cloning into 'echoprint-codegen'...
remote: Counting objects: 665, done.
remote: Compressing objects: 100% (280/280), done.
remote: Total 665 (delta 428), reused 612 (delta 376)
Receiving objects: 100% (665/665), 1.40 MiB | 578 KiB/s, done.
Resolving deltas: 100% (428/428), done.
~$ cd echoprint-codegen/
~/echoprint-codegen$ cd src/
~/echoprint-codegen/src$ vi Makefile # edit BOOST_CFLAGS and other variables as necessary
@mihahribar
mihahribar / mod_deflate
Created July 15, 2012 00:22
mod_deflate settings
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
@KrofDrakula
KrofDrakula / gist:4443227
Last active December 10, 2015 13:48
Problem: visit every pixel of a 2-dimensional texture using a single sequence generator

Declare a 2D texture with integer coordinates:

 ______w_______
|(0,0)         |
|              |
|              |h
|              |
|_____(w-1,h-1)|
@oogali
oogali / startoftheday.pl
Created May 31, 2013 15:30
Get sunrise times?
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
$city = shift || die "startoftheday <city> <state>";
$state = shift || die "startoftheday <city> <state>";
@time = localtime;
$year = $time[5] + 1900;
@rix501
rix501 / no-idea.coffee
Last active December 19, 2015 08:19
Hubot script for getting name-days for No Idea bar
# Description:
# Know name day in No Idea bar
#
# Dependencies:
# "cheerio": "0.12.0"
# "moment": "2.0.0"
#
# Configuration:
#
# Commands:
@jdp
jdp / csvq.py
Created January 15, 2014 23:58
turn csv files into sqlite tables and query them
#!/usr/bin/env python
import os
import sqlite3
from csvkit import table, CSVKitWriter
from csvkit.cli import CSVKitUtility
from csvkit.sql import make_create_table_statement, make_table
@jdp
jdp / server.py
Created February 10, 2016 06:55
Serve directory listing kinda like a GitHub project page
#!/usr/bin/env python
import cgi
import os
import mistune
from SimpleHTTPServer import SimpleHTTPRequestHandler
from SocketServer import TCPServer
from cStringIO import StringIO
@david-torres
david-torres / diffbot.py
Created November 3, 2011 18:13
Simple Python interface for Diffbot API
import requests
import json
class Diffbot(object):
"""
A simple Python interface for the Diffbot api.
Relies on the Requests library - python-requests.org
Usage:
from num2words import num2words
from matplotlib import pyplot
lang = 'de'
words = [num2words(i, lang=lang) for i in range(1000000)]
fig = pyplot.figure()
ax = fig.add_subplot(111)
ax.semilogx([len(word) for word in words], color='green')
@i-e-b
i-e-b / _1scatter.cs
Last active August 29, 2017 15:36
Sequence masks and code for old Hypercard fade
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Scramble_test {
public class Scrambler {
UInt32 mask = 0;
UInt32 value = 1;