Skip to content

Instantly share code, notes, and snippets.

@johngrimes
johngrimes / date.sql
Created May 21, 2010 07:03
MySQL Date Dimension Build Script
/* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */
###### small-numbers table
DROP TABLE IF EXISTS numbers_small;
CREATE TABLE numbers_small (number INT);
INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
###### main numbers table
DROP TABLE IF EXISTS numbers;
CREATE TABLE numbers (number BIGINT);
@sampsyo
sampsyo / genres.txt
Created September 25, 2011 23:19
music genre list scraper
2 tone
2-step garage
4-beat
4x4 garage
8-bit
acapella
acid
acid breaks
acid house
acid jazz
@oquno
oquno / lastfm2google.py
Created September 7, 2012 09:51
import Last.fm loved tracks to Google Play Music Highly rated tracks
#!/usr/bin/env python
import netrc, urllib, urllib2
from gmusicapi.api import Api
from xml.etree.ElementTree import *
lastfm__user = 'oquno'
api_key = 'your apikey'
def init():
api = Api()
@ttezel
ttezel / gist:4138642
Last active May 7, 2024 13:34
Natural Language Processing Notes

#A Collection of NLP notes

##N-grams

###Calculating unigram probabilities:

P( wi ) = count ( wi ) ) / count ( total number of words )

In english..

@rornor
rornor / read.md
Last active September 26, 2022 06:23
@bradcrawford
bradcrawford / feedly_export_saved_for_later
Last active February 26, 2024 07:07
Simple script that exports a users "Saved For Later" list out of Feedly as a JSON string
// Simple script that exports a users "Saved For Later" list out of Feedly
// as a JSON string.
//
// This was intended for use in the Google Chrome's "Inspector" tool so your
// mileage may vary if used in other contexts.
//
// Format of JSON is as follows:
// [
// {
// title: "Title",
@natelandau
natelandau / .bash_profile
Last active June 13, 2024 18:01
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@vishwasbabu
vishwasbabu / gist:dc105b6a9450cff8ff1f
Last active March 2, 2018 10:12
Create schema_version in `mifosplatform-tenants`
mysql -uroot -pmysql
use `mifosplatform-tenants`;
CREATE TABLE `schema_version` (
`version_rank` int(11) NOT NULL,
`installed_rank` int(11) NOT NULL,
`version` varchar(50) NOT NULL,
`description` varchar(200) NOT NULL,
`type` varchar(20) NOT NULL,
@akaleeroy
akaleeroy / Subreddit-to-YouTube-Source-Bookmarklet.md
Last active August 14, 2021 05:06
Subreddit to YouTube Source Bookmarklet - Play YouTube music from subreddits in Foobar with foo_youtube

Subreddit to YouTube Source Bookmarklet

No Maintenance Intended

Generates .M3U playlist of all YouTube videos in current subreddit listing for use in foobar2000 with the foo_youtube component.

This isn't maintained, look into R2YS - a foo_jscript_panel script for foobar2000.
Its use of the Reddit API requires an account though.

Preview of Subreddit to YouTubeSource. Creating an M3U playlist from posted YouTube videos

@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active May 7, 2024 13:07
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*