Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash +x
set -e
sudo -v
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get autoremove -y
from random import shuffle
class CardDecks:
# Base deck created on init
__base_deck = []
# Ace through King
card_types = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
@KegDemon
KegDemon / ChilloutMixer.php
Created March 9, 2014 04:12
PHP Example - Chillout Mixer Homepage Backend
<?php
$request = filter_input_array(INPUT_POST);
if ((!isset($request['fetch']) && !isset($request['token'])) || $request['token'] == null) {
$msg = json_encode(array('Error' => 'Bad Request'), true);
die($msg);
}
@KegDemon
KegDemon / plug.dj.bookmarklet.js
Last active August 29, 2015 13:57
Groove Shark Code Sample JS - Plug.dj Bookmarklet
function Core() {
this.autoGrabTimer = 20000; // 1000ms = 1s, 20000ms = 20s
this.autoWootTimer = 30000; // 1000ms = 1s, 30000ms = 30s
this.timeRemaining = 30; // Default time left to check for autoWoot/Curate
this.autoCurate = 0; // True / False (Turned off by default)
this.autoWoot = 0; // True / False (Turned off by default)
this.minWoots; // Minimum number of woots required to autoGrab a track
this.currentWoots; // Current Woots of the track
this.currentMeh; // Number of 'Meh''s that people have declared to weight autoGrab numbers against
this.hasBeenAdded; // Was the Track added by autoGrab yet