Skip to content

Instantly share code, notes, and snippets.

View trobrock's full-sized avatar

Trae Robrock trobrock

View GitHub Profile
model: (params) ->
@store.find('capsule').then (results) ->
m = results.findBy('id', params.capsule_id)
console.log m
m
class Itlum.CapsulesEditController extends Ember.ObjectController
actions:
update: ->
@model.save()
trobrock@app1:/var/myapp/current$ curl -v https://playfairapp.com
* About to connect() to playfairapp.com port 443 (#0)
* Trying 162.243.21.176... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSL connection timeout
* Closing connection #0
curl: (28) SSL connection timeout
root@chef:~# cat /etc/resolv.conf
nameserver 4.2.2.2
nameserver 8.8.8.8
" Commands for vimdiff-enhanced
nno do :<C-U>exe 'diffget' v:count ? v:count : ''<CR>
nno dp :<C-U>exe 'diffput' v:count ? v:count : ''<CR>
@trobrock
trobrock / gist:6717490
Created September 26, 2013 17:22
collectd
# collectd -T
plugin_load: Could not find plugin "nginx" in /usr/lib/collectd
Found a configuration for the `nginx' plugin, but the plugin isn't loaded or didn't register a configuration callback.
Exiting normally.
collectd: Stopping 5 read threads.
collectd: Stopping 5 write threads.
#compdef knife_ssh
#autoload
_knife_ssh() {
if hash knife 2>/dev/null; then
if [[ ! -f ~/.knife_comp~ ]]; then
echo "\nGenerating ~/.knife_comp~..." >/dev/stderr
knife node list > ~/.knife_comp~
fi
compadd `cat ~/.knife_comp~`
@trobrock
trobrock / parse_html.py
Created July 12, 2013 21:52
mutt html to markdown
#!/usr/bin/env python
from sys import argv
import html2text
file_name = argv[1]
fh = open(file_name)
contents = fh.read()
fh.close()
@trobrock
trobrock / notify.rb
Created June 20, 2013 17:06
weechat ruby notifications, thanks @joelteon
require 'ruby_gntp'
Weechat.register "notify", "otters", "0.2", "GPL", "notify: A real time notification system for weechat", "", ""
Settings = {
:show_hilights => "on",
:show_priv_msg => "on"
}
def notify_show data, buffer, empty, tagsn, isdisp, ishilight, prefix, msg