Skip to content

Instantly share code, notes, and snippets.

Base:
75g rice flour (eg Mochiko brand)
1 tbs baking powder
40g sugar
1 egg
1/2 cup milk
1 tbsp honey or agave
1 tbsp mirin (or other sweeted white wine)
1 tbsp unflavored oil (canola, safflower, etc)
Cake pop pan or takoyaki pan
@soycamo
soycamo / Vagrantfile
Created September 30, 2014 23:03
Datawrapper for CentOS development
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@soycamo
soycamo / gist:7327672
Created November 5, 2013 22:42
Quick way to see all FontAwesome icons in a Rails view
- icons_path = "vendor/toolkit/fontawesome/icons.less"
- icon_file = Gem.loaded_specs['twitter-bootstrap-rails'].full_gem_path + "/" + icons_ path
- all_icons = File.readlines(icon_file)
- all_icons.select! { |icon_line| icon_line.start_with? '.icon-' }
- all_icons.collect { |icon_line| icon_line.split(':')[0] }.each do |icon|
%h4.darkGray
%i.icon.icon-large{class: icon[1..-1]}
= icon
%pre %i.icon.#{icon[1..-1]}
@soycamo
soycamo / gist:7268730
Created November 1, 2013 17:21
Human transcribable confirmation code generation
require 'secure_random'
class Confirmation
def generate_confirmation_code
temp_code = SecureRandom.base64.gsub(/[lozsO105+\/=]/,'')[0..7].upcase.insert(4, '-')
Confirmation.find_by_code(temp_code) ? generate_confirmation_code : self.code = temp_code
end
end
@soycamo
soycamo / gist:6977499
Created October 14, 2013 15:29
post-receive hook for Jekyll
#!/bin/bash
GIT_REPO=/theflatfield/git/jekyll/busholini.git
TMP_GIT_CLONE=/theflatfield/git/jekyll/busholini
TMP_WWW=/theflatfield/git/jekyll/busholini/_site
REMOTE_DIR=/home/fromhell/busholini
git clone $GIT_REPO $TMP_GIT_CLONE
chgems /theflatfield/git/jekyll jekyll build -s $TMP_GIT_CLONE -d $TMP_WWW
scp -r $TMP_WWW other_server:$REMOTE_DIR
ssh other_server "umask -S;cp -vfr $REMOTE_DIR/_site/* $REMOTE_DIR/www;rm -rf $REMOTE_DIR/_site"
@soycamo
soycamo / soy.cow
Created June 25, 2013 16:50
soycow that works with cowsay
##
## A soycow!
##
$eye = chop($eyes);
$the_cow = <<EOC;
$thoughts
$thoughts _______________
/ \\
| $eye |
| _ |
@soycamo
soycamo / modernworldjs.html
Created December 5, 2012 04:57
modern world js, first revision
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>the Modern World</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="robots" content="" />
<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<style type="text/css">