This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All unfinished items from a list called "Buy" | |
cat ~/Downloads/wunderlist-20140214-23-56-27.json | \ | |
jq -r '([.lists[] | {key: .id, value: .title}] | from_entries) as $lists | | |
.tasks | | |
map(select(.completed_at == null)) | | |
map({title, list: $lists[.list_id]}) | | |
map(select(.list == "Buy")) | | |
.[].title' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# otr - WeeChat script for Off-the-Record IRC messaging | |
# | |
# DISCLAIMER: To the best of my knowledge this script securely provides OTR | |
# messaging in WeeChat, but I offer no guarantee. Please report any security | |
# holes you find. | |
# | |
# Copyright (c) 2012-2014 Matthew M. Boedicker <matthewm@boedicker.org> | |
# Nils Görs <weechatter@arcor.de> | |
# Daniel "koolfy" Faucon <koolfy@koolfy.be> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
require 'fileutils' | |
job = ARGV[0] | |
job_spec = YAML.load_file(File.join('jobs', job, 'spec')) | |
packages = job_spec['packages'] | |
work_dir = 'docker' | |
FileUtils.mkdir_p(work_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# When USB drives are mounted, check them for a script called plz_verify.sh | |
# and run it if found. | |
# | |
# symlink all USB volumes you want to check into ~/usb | |
# ln -s /Volumes/mmb ~/usb/mmb | |
require 'logger' | |
require 'set' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<p>hello</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create | |
@src_image = SrcImage.new(src_image_params) | |
@src_image.user = current_user | |
read_image_data @src_image | |
respond_to do |format| | |
if @src_image.save | |
create_success(format) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rmagick' | |
img_list = Magick::ImageList.new('http://i.imgur.com/Txjn52a.gif') | |
p img_list.size | |
img_list = Magick::ImageList.new('http://i.imgur.com/UthfKGQ.jpg') | |
p img_list.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
COPY_PATH=/tmp/mount_mmb.sh | |
MOUNT_PATH=/Volumes/mmb | |
cat > $COPY_PATH << EOF | |
#!/bin/bash | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -d 'curl -s http://router:router@10.244.0.22:8080/routes \ | |
| jq -r "to_entries[] | .key+\" \"+.value[].address+\" \"+.value[].route_service_url" | \ | |
column -t' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# convert embed code generated by some Flash video players into valid markup | |
# (use object tag instead of deprecated embed tag) | |
require 'rexml/document' | |
require 'rubygems' | |
require 'builder' | |
OlderNewer