Skip to content

Instantly share code, notes, and snippets.

View cmhobbs's full-sized avatar
🍩
Waiting between the walls.

Christopher M. Hobbs cmhobbs

🍩
Waiting between the walls.
View GitHub Profile
@cmhobbs
cmhobbs / database.yml
Last active August 29, 2015 14:17 — forked from bigfive/database.yml
core: &core
adapter: postgis
encoding: unicode
host: 127.0.0.1
username: postgres
database: magnum<%= ENV['CI_BUILD_NUMBER'] %>
development:
<<: *core
test:
vagrant@developer:~/src/acumenbrands/dataops/failthru_parser(master*)$ ls -alh /tmp/st.log.gz
-rw-rw-r-- 1 vagrant vagrant 2.8M Aug 21 09:06 /tmp/st.log.gz
vagrant@developer:~/src/acumenbrands/dataops/failthru_parser(master*)$ ls -alh /tmp/raw_logs.out
-rw-rw-r-- 1 vagrant vagrant 24M Aug 21 13:28 /tmp/raw_logs.out
vagrant@developer:~/src/acumenbrands/dataops/failthru_parser(master*)$ ls -alh /tmp/dated_logs.out
-rw-rw-r-- 1 vagrant vagrant 877K Aug 21 13:27 /tmp/dated_logs.out
[3] pry(main)> parser.file
=> #<File:/tmp/st.log.gz>
[4] pry(main)> parser.raw_logs.count
=> 13772
[5] pry(main)> parser.logs_with_dates.count
=> 495
W, [2014-06-18T10:09:04.897542 #1838] WARN -- : wat
=> true
2.0.0-p247 :005 > l.info("wat")
I, [2014-06-18T10:09:37.896198 #1838] INFO -- : wat
=> true
2.0.0-p247 :006 > l.info(["foo", "bar", "wat"])
I, [2014-06-18T10:10:21.495064 #1838] INFO -- : ["foo", "bar", "wat"]
=> true
@cmhobbs
cmhobbs / gist:6498425
Created September 9, 2013 16:56
Chris
I am Chris.
Chris, Chris, Chris.
@cmhobbs
cmhobbs / steps
Last active December 22, 2015 10:29
Fancy GUI Rails-friendly emacs install with functionality similar to Acumen Brands' dotmatrix for OSX.
;; extend the load-path
(let ((default-directory "~/.emacs.d/lisp/"))
(normal-top-level-add-to-load-path '("."))
(normal-top-level-add-subdirs-to-load-path))
;; package archives, MELPA and ELPA
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(when (< emacs-major-version 24)
info it worked if it ends with ok
verbose cli [ 'node', '/usr/bin/npm', 'install' ]
info using npm@1.1.4
info using node@v0.6.12
verbose config file /home/christopher/.npmrc
verbose config file /usr/etc/npmrc
verbose config file /usr/share/npm/npmrc
verbose caching /home/christopher/src/pump.io/package.json
verbose loadDefaults pump.io@0.3.0-alpha.1
verbose readDependencies: using package.json deps
We do not have client_id/client_secret yet; doing Dynamic Client Registration
About to POST: "{ "type": "client_associate", "application_type": "native", "application_name": "Dianara" }"
Request finished. HTTP code: 200
Size: 115 bytes; URL: QUrl( "https://microca.st/api/client/register" )
isFinished()? true ; Request type: 1
HTTP 200: OK!
JSON data size (items): 3
Keys: ("client_id", "client_secret", "expires_at")
Client Registration was requested
Raw JSON: QMap(("client_id", QVariant(QString, "REDACTED") ) ( "client_secret" , QVariant(QString, "REDACTED") ) ( "expires_at" , QVariant(qulonglong, 0) ) )
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../../dianara-v0.8 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtDBus -I/usr/include/qt4 -I/usr/include/QtOAuth -I/usr/include/QtCrypto -I. -I../../dianara-v0.8 -I. -o main.o ../src/main.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../../dianara-v0.8 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtDBus -I/usr/include/qt4 -I/usr/include/QtOAuth -I/usr/include/QtCrypto -I. -I../../dianara-v0.8 -I. -o mainwindow.o ../src/mainwindow.cpp
../src/mainwindow.cpp:988:6: warning: unused parameter ‘timelineType’ [-Wunused-parameter]
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_G
class Consecutive
attr_reader :string, :totals
def initialize(string)
@string = string
@totals = count_characters
end
def max_consecutive_characters