Skip to content

Instantly share code, notes, and snippets.

View steve-ayerhart's full-sized avatar
💭
I write guile vaporware

Steve steve-ayerhart

💭
I write guile vaporware
View GitHub Profile
#!/usr/bin/env zsh
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
setopt promptsubst
autoload -U add-zsh-hook
PROMPT_SUCCESS_COLOR=$FG[117]
PROMPT_FAILURE_COLOR=$FG[124]
PROMPT_VCS_INFO_COLOR=$FG[242]
function events_management_js() {
?>
<script type="text/javascript">
var date_time_counter = 0;
function event_add_date_time_form_fields(date, hour, minute, meridiem, type) {
dt_id = "date-time-" + date_time_counter;
dt_name = "date_times[" + date_time_counter + "]";
html = '';
html += '<div id="'+dt_id+'" class="date-time">';
{BaseView} = require '../base'
class exports.LoginView extends BaseView
template: require 'templates/auth/login'
initialize: ->
super
app.debug 'LoginView', 'initialize'
@el = $('#auth')
plugin.EmoticonPlus = function(matcher, image) {
this.matcher = matcher;
this.image = image;
this.getImage = function() {
var img = ['<img src="', image, '" />'];
return img.join('');
}
}
plugin.onMessageSend = function(talkerEvent)
{
if (/steve.platz/.test(Talker.getCurrentUser().name) && /DAY CREW/.test(document.title))
{
return false;
}
}
;; load el-get
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil t)
(with-current-buffer
(url-retrieve-synchronously "https://raw.github.com/dimitri/el-get/master/el-get-install.el")
(end-of-buffer)
(eval-print-last-sexp)))
; enable evil
<JID> ::= [<node>"@"]<domain>["/"<resource>]
<node> ::= <conforming-char>[<conforming-char>]*
<domain> ::= <hname>["."<hname>]*
<resource> ::= <any-char>[<any-char>]*
<hname> ::= <let>|<dig>[[<let>|<dig>|"-"]*<let>|<dig>]
<let> ::= [a-z] | [A-Z]
<dig> ::= [0-9]
<conforming-char> ::= #x21 | [#x23-#x25] | [#x28-#x2E] |
[#x30-#x39] | #x3B | #x3D | #x3F |
[#x41-#x7E] | [#x80-#xD7FF] |
<div class="clipping" data-toggle="popover" data-container="body" data-placement="right" data-html="true" data-trigger="hover" data-title="What is this?" data-content="{% filter escape %}{% include('_what-is-this.twig') %}{% endfilter %}">
sc2 () {
ruby -e 'require "json";JSON.parse(ARGV[0])["streams"][0..9].each{|s|printf("%s ", s["channel"]["name"])};puts' "$(curl -sH 'Accept: application/vnd.twitchtv.v3+json' -X GET https://api.twitch.tv/kraken/streams?game=StarCraft+II)"
}
alias lstrmr=livestreamer-wrapper
alias twitch=twitch-wrapper
livestreamer-wrapper () {
livestreamer $1 best 1>/dev/null &
}
twitch-wrapper () {
livestreamer-wrapper twitch.tv/$1
}