Skip to content

Instantly share code, notes, and snippets.

View steven2358's full-sized avatar

Steven Van Vaerenbergh steven2358

View GitHub Profile
@steven2358
steven2358 / desaturate.js
Created May 27, 2014 09:48
Desaturation bookmarklet
javascript:(function(){
if (document.body.parentNode.style.webkitFilter==='grayscale(1)'){
document.body.parentNode.style.webkitFilter='grayscale(0)'
} else {
document.body.parentNode.style.webkitFilter='grayscale(1)';
}
})();
@steven2358
steven2358 / cue_sheet_converter.py
Last active August 29, 2015 14:02
Convert a playlist in text format to a cue file
# Convert a playlist in text format to a cue file
# Author: steven2358
# Usage:
# 1. Make a playlist file "playlist.txt" using this format:
'''
Album Artist - Album Name
FileName.mp3
MM:SS:mm - Artist1 - Title1
MM:SS:mm - Artist2 - Title2
MM:SS:mm - Artist3 - Title3
@steven2358
steven2358 / shopping_carts.md
Last active August 29, 2015 14:05
Shopping Carts
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@steven2358
steven2358 / README.md
Last active December 24, 2015 02:39
Simple Slide: A jQuery slideshow that simply fades between a list of images.

Simple Slide

A jQuery slideshow that simply fades between a list of images.

Features:

  • Options: slide duration, fade time
  • Allows for multiple slideshows at once
  • No bells
  • No whistles
@steven2358
steven2358 / 0_reuse_code.js
Created November 18, 2013 13:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@steven2358
steven2358 / hide_user_history.info
Created November 18, 2013 13:10
Drupal 6 module to hide user history in user profile
name = Hide user history
description = "Hide the history tab on user pages."
package = User interface
version = "6.x-1.0"
core = "6.x"
project = "hide_user_history"
@steven2358
steven2358 / hide_language_options.info
Created November 18, 2013 13:15
Drupal 6 module to hide language options on the user edit page
name = Hide language Options
description = "Hide the language options on the user edit page."
dependencies[] = locale
package = User interface
version = "6.x-1.0"
core = "6.x"
project = "hide_language_options"
@steven2358
steven2358 / .htaccess
Created February 9, 2016 18:39
.htaccess for 301 redirect to new domain
Redirect 301 / http://www.newdomain.com/
@steven2358
steven2358 / kaggle.py
Last active March 8, 2016 15:13
Check if Kaggle has launched a competition today
# Check if Kaggle has launched a competition today.
#
# Ported to Python 2 from https://github.com/BraunPhilipp/snippets/blob/master/kaggle.py
from urllib2 import urlopen
from bs4 import BeautifulSoup
import time
import random
import string
import datetime