A Pen by Hidenari Nozaki on CodePen.
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
HTML Font Size mapping | |
1: < 12px | |
2: < 15px | |
3: < 17px | |
4: < 21px | |
5: < 28px | |
6: < 40px | |
7: >= 40px |
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
[user] | |
name = ... | |
email = YOUR@EMAIL.COM | |
[core] | |
autocrlf = input | |
safecrlf = true | |
[alias] | |
co = checkout | |
ci = commit | |
st = status |
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 ruby_version() { | |
echo `rbenv version | sed -e 's/ .*//'` | |
} | |
PROMPT='%{$fg[yellow]%}$(ruby_version)%{$fg[yellow]%} %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%} | |
$ ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[yellow]%}✗%{$reset_color%}" |
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 python | |
import sys | |
import gdata.service | |
import subprocess | |
import getpass | |
import urllib | |
import re | |
import os | |
import ConfigParser |
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
#https://github.com/javan/whenever | |
set :output, "#{path}/logs/cron.log" | |
every [:sunday, :monday, :tuesday, :wednesday, :thursday], :at => "15:50" do | |
command "ruby #{path}/something.rb" | |
end |
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 'amqp' | |
EventMachine.run do | |
connection = AMQP.connect(:host => '127.0.0.1', :username => 'guest', :password => 'guest') | |
puts "Connecting to AMQP broker. Running #{AMQP::VERSION} version of the gem..." | |
channel = AMQP::Channel.new(connection) | |
queue = channel.queue("rubyqueue", :auto_delete => true) | |
exchange = channel.default_exchange |
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
property theURL : "" | |
tell application "Safari" | |
set theURL to URL of current tab of window 1 | |
end tell | |
tell application "Google Chrome" | |
if not (window 1 exists) then | |
make new window | |
end if |
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
/* just a snippet */ | |
var client_ids = [a, b, c]; | |
for (var cid in client_ids) { | |
socket.clients[client_ids[cid]].send('hello'); | |
} | |
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
Variable X = new Variable("X"); | |
Query q4 = | |
new Query( | |
"descendent_of", | |
new Term[] {X,new Atom("ralf")} | |
); | |
java.util.Hashtable solution; | |
solution = q4.oneSolution(); |