Skip to content

Instantly share code, notes, and snippets.

{BaseController} = require './base'
class QueryController extends BaseController
constructor: (@table) ->
super()
@map =
gt: '>'
gte: '>='
lt: '<'
@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 = {
-------------------------------------------------------------------------------------------------------------------
-- 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:
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) {
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/'
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]
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);
@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);
smartctl 6.6 2017-11-05 r4594 [Darwin 17.4.0 x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Hitachi Ultrastar 7K3000
Device Model: Hitachi HUA723020ALA641
Serial Number: YFG86ELA
LU WWN Device Id: 5 000cca 223c3bb23
Firmware Version: MK7OA840
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
@infernoboy
infernoboy / videosubscriptionsd.2.log
Created January 15, 2019 06:18
videosubscriptionsd.2.log
{"blame":[],"app_name":"videosubscriptionsd","timestamp":"2019-01-13 16:42:06.48 -0500","app_version":"","slice_uuid":"4393dd09-05a7-3139-8605-28464675670a","build_version":"","share_with_app_devs":false,"is_first_party":true,"bug_type":"109","os_version":"iPhone OS 11.3.1 (15E302)","incident_id":"9306C21D-863D-4D67-9F60-32A586452EAD","name":"videosubscriptionsd","symbolicated":true}
Incident Identifier: 9306C21D-863D-4D67-9F60-32A586452EAD
CrashReporter Key: df6f305b007c27621076dc48097efae6dad141b9
Hardware Model: iPhone9,2
Process: videosubscriptionsd [163]
Path: /usr/libexec/videosubscriptionsd
Identifier: videosubscriptionsd
Version: ???
Code Type: ARM-64 (Native)
Role: Unspecified