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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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> | |
<html> | |
<head> | |
<title>iOS6 Safari Photo Capture Demo</title> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var input = document.getElementById("input"); | |
input.addEventListener("change", handleFile); | |
} |
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
package com.cube.vision; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.LinearLayout; | |
public class SquareLayout extends LinearLayout { | |
public SquareLayout(Context context) { | |
super(context); | |
} |
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 'daemons' | |
require 'tweetstream' | |
$output_file = '???/deleted_tweets.txt' | |
Daemons.run_proc( | |
'deletweet', | |
log_output: true, | |
dir_mode: :script | |
) do |
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 'OpenSSL';require 'Base64';c = 'A9owhIxrZX3kHFGKqn0dOoybYZWBQxGygOviG1ane9/aDwezVW/AzDDoD6ZZTdLkjd3RAxbkHD9rHSa+Z7js6QzylYBnMsPjZYVzEE//g4/2anuBI9aWwKjqj45T1UkO4cxKtziUzwPB5rXt5Rx1AnwzUeI0brlqcqNctzLp4aVZbfbW4p0gHUTAej3wk4uD3+ioqMe4hDGUQWiUp9p7IDHancMhhQg60O9990TFev54YUBokJxj09Wo8SsMbw7M/Xy/xJ3gbc9tx9fBGGASJcTkCdHqYYU4kOieogC9AtHM54xsfhKu5s5okyFPHaN9ylboEmB0IlZnwf7GhG6IOuOAC9o7jI31mrRbjTiyYglcNPf5yrVepPpZOlJ+sjNKIf6meDdrmIdv2iyMAvIVfoVEOmnzyFAE6r7sCQ3nyAHHtdDKErSWkhWsPgLg5Gl5b3pEazHVrafB2aeqYKeTzNGejxjVXMId2K2v1I0MqUgTLlJ2gyAWHtUcV63yX6DplqCph4vylwap0JH+dp8kltUimeC/qKYSFZL45lhFlNoMDF4O89ekizZmljCMtVgll1Amzt5/xDAcHMXoEz7iZ3xTArDbt0FbX6HjABPvcCJTAhl8kDV0BqILXfJycJ8rKvlXJ5pqoryYZJoNqTOvaiRiRHokX5xM07ej8japZeYZq2F20ejJL1oB13Q11LuGS2YnjlcDtxbdDcHJikUj28GmI19/lZenj1IiktoO1zPlPyFXO8GZXTM5y8RbVM/WyUBNPh3Peae7PcAfD6SPZLJAbOd6Xe46H4yNv2kuxV3HJVQc37+Sp5ALWxEIdDA+GLNbLvTdLo9T1mUJbO/vHn0iHHIrwccfaY6IyFVQQW/9TSVUka7ulL7QuSu8gsD1/5BYhZJAX4Un6ZOl35UR4onoTGnP1DTrOa7yp9RLAfvrd0iaSXNF3aZkLO8n7X6LmqUr2krCtEb2uVANeUfr3+wU |
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 | |
emojis=( ✨ ⚡️ 💫 🔑 ) | |
num_emojis=${#emojis[*]} | |
echo "${emojis[$((RANDOM%num_emojis))]}" |
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 | |
# Heavily based on https://github.com/ip2k/twitter-avatar-update | |
# ==== Gems ==== | |
require 'twitter_oauth' | |
require 'oauth' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'yaml' |
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
function renderSVG() { | |
services.fetchAll() | |
.done(function(results) { | |
const data = {}; | |
results.forEach(r => data[r.name] = r); | |
const lastSeenDates = results.map(r => r.lastSeenDate); | |
data.lastSeenDate = Math.max.apply(Math, lastSeenDates); | |
// console.log(data) |
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
git log --pretty=format:"- %s" --decorate |
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
defmodule Chop do | |
def guess(actual, a..b) do | |
mid = midpoint(a, b) | |
IO.puts "Is it #{mid}?" | |
compare actual, a..b, mid | |
end | |
defp compare(actual, _.._, current) when current == actual do | |
IO.puts "Got it! It was #{actual}" |