This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// chirp screw: parameterized on 0 <= t <= 1 | |
t_steps = 500; | |
major_d = 50; | |
major_facets = 71; | |
minor_d = 4; | |
minor_facets = 17; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I needed to sure I was operating on pristine test databases | |
# every time my code called $test->schema (DBIx::Class and Test::Class::Moose). | |
# This handles that for me | |
package TestsFor::SeKreT { | |
use Test::Class::Moose; | |
use Less::Boilerplate; # gives me a sane version of Perl | |
use File::Copy qw(copy); | |
use File::Spec::Functions qw(catfile); | |
use SeKreT::Util::Data qw( | |
make_slug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"net/url" | |
"os" | |
"reflect" | |
"regexp" | |
"strconv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use HiPi::Device::OneWire; | |
my @devices = HiPi::Device::OneWire->list_slaves(); | |
for my $w1 ( @devices ) { | |
for ( qw( id family name description ) ) { | |
print qq($_ = $w1->{$_}\n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq org-capture-templates | |
'(("t" "Todo" entry (file+headline (concat org-directory "inbox.org") "Tasks") | |
"* TODO %?\n %U\n %i\n %a") | |
("s" "Code Snippet" entry | |
(file (concat org-directory "snippets.org")) | |
;; Prompt for tag and language | |
"* %?\t%^g\n#+BEGIN_SRC %^{language}\n\n#+END_SRC") | |
("m" "Media" entry | |
(file+datetree (concat org-directory "media.org")) | |
"* %?\nURL: \nEntered on %U\n"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN; | |
DO $$ | |
BEGIN | |
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'task_status') THEN | |
create type task_status AS ENUM ('todo', 'doing', 'blocked', 'done'); | |
END IF; | |
END | |
$$; | |
CREATE TABLE IF NOT EXISTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# mosquitto This shell script takes care of starting and stopping | |
# mosquitto (MQTT 3.1 broker) on Amazon Linux. | |
# | |
# chkconfig: - 58 74 | |
# description: mosquitto is a MQTT 3.1 broker. \ | |
# http://mosquitto.org/ | |
### BEGIN INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# PS1 magic | |
# | |
# Mostly copied from YUVAL KOGMAN version, added my own __git_ps1 stuff | |
# Original: http://gist.github.com/621452 | |
# | |
# See video demo of this at http://vimeo.com/15789794 | |
# | |
# To enable save as .bash_prompt in $HOME and add to .bashrc: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_set_prompt () { | |
local exit=$? | |
#local black="30"; | |
#local grey="31"; | |
local red="31"; | |
local green="32"; |
NewerOlder