Skip to content

Instantly share code, notes, and snippets.

@infernoboy
infernoboy / task_tracker.sql
Last active March 12, 2016 19:04
A task tracker.
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE "task" (
"id" INTEGER NOT NULL,
"name" TEXT NOT NULL ON CONFLICT FAIL,
"setting_id" INTEGER,
PRIMARY KEY("id"),
CONSTRAINT "setting_id" FOREIGN KEY ("setting_id") REFERENCES "task_setting" ("id")
);
INSERT INTO "task" VALUES(1,'Running',1);
public function days_request($room_id, $first_day, $last_day, $dst)
{
global $console;
if(!$this->allowed_in_room($room_id)) return false;
$days = array();
$offset = 0;
list($dst_start, $dst_offset, $dst_end, $dst_end_offset) = explode(',', $dst);
Incident Identifier: 5BB8DE81-953C-48B8-8370-9D2DAE08DC03
CrashReporter Key: ace8a243d7ac92657b0aca087450bed6f5e57b82
Hardware Model: iPad4,4
Process: Winterhawks Pick6 [3413]
Path: /private/var/mobile/Containers/Bundle/Application/712DA30E-EA5B-47EB-8C3D-A6DA94B7FD5E/Winterhawks Pick6.app/Winterhawks Pick6
Identifier: com.pick6fan.pick6
Version: 1.3 (1.3)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
import java.util.HashMap;
import spark.ModelAndView;
import spark.template.velocity.VelocityTemplateEngine;
import static spark.Spark.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Arrays;
public class App {
public static void main(String[] args) {
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:
ExtraSongsMode may take one of three values: None, Dummy, FullLength
You can set these via the standard 'set' and 'cycle' self-commands. EG:
@infernoboy
infernoboy / bottles.js
Created September 21, 2015 00:51
Bottles of Beer
var playBottleSong = function (numberOfBottles) {
var hasBottlesTemplate = '{beforeTakenDown} {bottlesBefore} of beer on the wall, ' +
'{beforeTakenDown} {bottlesBefore} of beer. Take one down and pass it around, ' +
'{afterTakenDown} {bottlesAfter} of beer on the wall.<br>';
var noBottlesTemplate = 'No bottles of beer on the wall, no bottles of beer. ' +
'Go to the store and buy some more, 99 bottles of beer on the wall.';
var bottleInfo = {
{BaseController} = require './base'
class QueryController extends BaseController
constructor: (@table) ->
super()
@map =
gt: '>'
gte: '>='
lt: '<'
from django.db import models
from datetime import datetime
from django.db.models.query import QuerySet
from django.contrib.auth.models import User
from django.db.models import Count
from orca.settings import STATIC_URL
from random import randint
from autoslug import AutoSlugField
BASE_URL = '/comic/'