Skip to content

Instantly share code, notes, and snippets.

View index.html
<!doctype html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<style>
</style>
<script>
var Mentionable = function(element, callback) {
self = this;
View weechat-slack-irc.conf
/server add <name> <team>.irc.slack.com/6667 -ssl -password=<password>
/set irc.server.<name>.ssl_verify off
/set irc.server.<name>.nicks <username>
/connect <name>
View todo.vim
function! s:ConvertToCharClass(cur)
if a:cur =~ '[2-9]'
return '[0-' . (a:cur-1) . ']'
endif
return '0'
endfunction
function! s:MatchNumberBefore(num)
let branches = []
let init = ''
View todo.vim
function! s:ConvertToCharClass(cur)
if a:cur =~ '[2-9]'
return '[0-' . (a:cur-1) . ']'
endif
return '0'
endfunction
function! s:MatchNumberBefore(num)
let branches = []
let init = ''
View todo.vim
function! HighlightDate(date)
exec "syntax match TodoDateBeforeToday '" . a:date . "'"
highlight link TodoDateBeforeToday TodoRed
endfunction
function! UpdateDateHighlights()
let l:match = '\[\(\d\{2}\)\-\(\d\{2}\)\-\(\d\{4}\)\]'
let l:yearToday = str2nr(strftime("%Y"))
let l:line = 0
while l:line < line('$')
View ddd2
a107598d
elasticsearch.4.service not-found failed failed elasticsearch.4.service
1e99f455
elasticsearch.4.service loaded active running elasticsearch
fe2579bc
elasticsearch.1.service loaded active running elasticsearch
3e605aff
View gist:9819948
a107598d
elasticsearch.4.service loaded active running elasticsearch
1e99f455
elasticsearch.4.service loaded failed failed elasticsearch
fe2579bc
elasticsearch.1.service loaded active running elasticsearch
3e605aff
View docker-index.service
[Unit]
Description=docker-registry
After=docker.service
Requires=docker.service
[Service]
TimeoutSec=5min
ExecStart=/usr/bin/docker run --name docker-registry --rm -p 5000:5000 -v /media/state/registry:/tmp/registry samalba/docker-registry
ExecStop=-/usr/bin/docker stop docker-registry
ExecStopPost=-/usr/bin/docker rm docker-registry
View launch-elasticsearch
if [ -n "$AWS_ACCESS_KEY" && -n "$AWS_SECRET_KEY" ]; then
echo cloud.aws.access_key: $AWS_ACCESS_KEY >> $YML
echo cloud.aws.secret_key: $AWS_SECRET_KEY >> $YML
if [ -n "$AWS_REGION" ]; then
echo cloud.aws.region: $AWS_REGION >> $YML
fi
echo discovery.type: ec2 >> $YML
fi
View server.go
func pathExists(path string) bool {
_, err := os.Stat(path)
if err == nil {
return true
}
return false
}
You can’t perform that action at this time.