Glide is the easiest way to create useful slide for all of your Gists.
- input key
<-
to go backward. - input key
->
to go forward.
🍣
#################### helpers | |
def _gem(gem_info) | |
if gem_info.is_a? String | |
gem gem_info | |
elsif gem_info.is_a? Array | |
gem *gem_info | |
end | |
end |
require 'user_stream' | |
require 'curses' | |
require 'thread' | |
require 'pry' | |
class Text | |
def initialize(x, body) | |
@x = x | |
@body = body | |
end |
#!/usr/env/ruby -v | |
require 'benchmark' | |
measure = Benchmark.measure { | |
@crossing_count = 0 | |
def merge(a, b) | |
sorted = [] | |
until (a.empty? || b.empty?) | |
if a.first < b.first |
#!/usr/env/ruby -v | |
require 'benchmark' | |
measure = Benchmark.measure { | |
require 'redis' | |
redis = Redis.new | |
redis.del :ray | |
INPUT = 'crossing.txt' |
# usage: | |
# $ git bisect start HEAD [past good commit] | |
# $ git bisect run ruby ab_bisect.rb | |
require 'systemu' | |
systemu 'bundle' | |
systemu 'bundle exec rails s -d' | |
sleep 5 |
passphrase: 'kagitter' # (required) passphrase to encrypt your tweet. | |
prefix: '@null' # (optional) add prefix to your tweet | |
suffix: '#kagitter' # (optional) add suffix to your tweet |
<html> | |
<head> | |
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"></script> | |
</head> | |
<body> | |
<script> | |
var word = "なんやかんや"; | |
var encrypted = CryptoJS.AES.encrypt(word, "pass phrase").toString(); | |
var decrypted = CryptoJS.AES.decrypt(encrypted, "pass phrase").toString(CryptoJS.enc.Utf8); | |
console.log(word == decrypted); |
require 'zipruby' | |
require 'fileutils' | |
ROOT_DIR = File.expand_path(File.dirname(__FILE__)) | |
Dir::glob("#{ROOT_DIR}/*.zip") do |zip_file| | |
folder_name = nil | |
Zip::Archive.open(zip_file) do |archive| | |
puts "extract: #{zip_file}" |
(define (cube n) (* n n n)) | |
(define t 0.1) | |
(define (x k) | |
(define (pre l) (x (- l 1))) | |
(if (= k 0) | |
2 | |
(- (pre k) | |
(* t (- | |
(* 4 (cube (pre k))) | |
(* 8 (pre k))))))) |