Skip to content

Instantly share code, notes, and snippets.

View jasonblewis's full-sized avatar

Jason Lewis jasonblewis

View GitHub Profile
@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'
@jasonblewis
jasonblewis / gist:6086206
Created July 26, 2013 04:28
connect string
client = TinyTds::Client.new(:username => 'XXXX', :password => 'YYYY', :host => 'ZZZ', :timeout => 0)
result = client.execute("USE AAAA")
result.cancel
** Hello World
#+ATTR_REVEAL: :frag roll-in
- use tpage to test your Templates
#+NAME: Example 01
#+ATTR_REVEAL: :frag roll-in
#+BEGIN_SRC perl
[% str = 'Hello Tug2013' -%]
[% str %]
#+END_SRC
#+ATTR_REVEAL: :frag roll-in
@jasonblewis
jasonblewis / gist:7017451
Created October 17, 2013 00:40
causing fontlock error when exporting from org-reveal. seems to be the double backslash on line 4 causing the problem
* test
#+BEGIN_SRC latex
\tabletail{
\scriptsize{test\ldots} \\
}
#+END_SRC
Try pressing C-c C-e hH to export
gives error:
face-attribute: Invalid face: font-lock-warning
* test
#+BEGIN_SRC latex
\\
#+END_SRC
@jasonblewis
jasonblewis / gist:7017964
Created October 17, 2013 01:38
try exporting from an org buffer, with C-c C-e hh gives: face-attribute: Invalid face: font-lock-warning
#+BEGIN_SRC latex
\titleformat{\chapter}
#+END_SRC
@jasonblewis
jasonblewis / gist:7651396
Created November 26, 2013 00:28
how to get data into the dashing graph. using seconds from epoch is the trick.
# Populate the graph with some random points
require 'tiny_tds'
require 'yaml'
config = YAML.load_file('lib/connection.yml')
client = TinyTds::Client.new(config["connection"])
result = client.execute("USE " + config["database"])
result.cancel
@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: