Skip to content

Instantly share code, notes, and snippets.

View jasonblewis's full-sized avatar

Jason Lewis jasonblewis

View GitHub Profile
@jasonblewis
jasonblewis / gist:8857323
Created February 7, 2014 04:19
my smartparens config
in init.el
;;; smartparens stuff
(smartparens-global-mode t)
(require 'smartparens-config)
(load "init-smartparens")

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
### Keybase proof
I hereby claim:
* I am jasonblewis on github.
* I am jasonblewis (https://keybase.io/jasonblewis) on keybase.
* I have a public key whose fingerprint is B10B 2E72 BB30 FE47 ABC2 F1B9 FA57 1EC7 505E 764E
To claim this, I am signing this object:
@jasonblewis
jasonblewis / gist:b10ccbe2a4471925c9fd
Created October 11, 2014 06:45
suppress page number output for \part in tableofcontents
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tocloft}
\title{42}
\author{Jane Doe}
\date{June 2011}
\begin{document}
@jasonblewis
jasonblewis / gist:7f216d8f62152298b911
Created May 4, 2015 01:15
Dancer2 failed to install
cpanm (App::cpanminus) 1.7001 on perl 5.020001 built for x86_64-linux-thread-multi
Work directory is /home/jason/.cpanm/work/1430700355.28863
You have make /usr/bin/make
You have LWP 6.13
You have /bin/tar: tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
cpanm (App::cpanminus) 1.7001 on perl 5.020001 built for x86_64-linux-thread-multi
Work directory is /home/jason/.cpanm/work/1430700662.29697
You have make /usr/bin/make
You have LWP 6.13
You have /bin/tar: tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
with basequery as (
select customer_name,
product_code,
sum(sales_qty) as sales_qty,
convert(varchar(2),datediff(month, invoice_date, DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0))) as [age]
from sh_select_trans_view
where customer_name is not null
and invoice_date >= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-13, 0) -- rolling 13 month
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
http://p.hagelb.org/actnotes.pl.html
#!/usr/bin/env perl
use utf8;
use strict;
use warnings;
use DBI;
use Data::Dumper;
use Text::CSV;
use File::Slurper 'read_text';
use RTF::TEXT::Converter;
use 5.22.0;
@jasonblewis
jasonblewis / gist:6086065
Created July 26, 2013 04:03
dashing exception
jason@debian:~/ot-dashboard$ dashing start
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3030, CTRL+C to stop
================================================================================
scheduler caught exception:
Adaptive Server connection timed out
/home/jason/ot-dashboard/jobs/mtdsales.rb:19:in `each'
/home/jason/ot-dashboard/jobs/mtdsales.rb:19:in `block in <top (required)>'
/home/jason/.rvm/gems/ruby-1.9.3-p429/gems/rufus-scheduler-2.0.19/lib/rufus/sc/jobs.rb:231:in `call'