Skip to content

Instantly share code, notes, and snippets.

View yucao24hours's full-sized avatar
🎀
Learning DNS

Yuka Ishida yucao24hours

🎀
Learning DNS
View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 1, 2026 06:00
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@metaskills
metaskills / wait_until.rb
Last active May 2, 2024 01:51
Never sleep() using Capybara!
# WAIT! Do consider that `wait` may not be needed. This article describes
# that reasoning. Please read it and make informed decisions.
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path
@npj
npj / gist:2044147
Created March 15, 2012 13:16
Rack IP Filter + HTTP Basic Auth
class FilterAuth < ::Rack::Auth::Basic
def initialize(app, options = { }, realm=nil, &authenticator)
super(app, realm, &authenticator)
@ip_filter = ::Rack::Access.new(app, options)
end
def call(env)
# only need to do auth if the ip filter blocks the request
response = @ip_filter.call(env)
@btoone
btoone / curl.md
Last active February 25, 2026 14:37
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@Gab-km
Gab-km / github-flow.ja.md
Last active February 23, 2026 01:59 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active March 1, 2026 01:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@nomnel
nomnel / 1.rb
Last active December 15, 2015 02:08
[プログラミング入門 - Rubyを使って -](http://www.ie.u-ryukyu.ac.jp/~kono/software/s04/tutorial/)の練習問題
puts "1年は#{365 * 24}時間です"
puts "10年間は#{60 * 24 * 365 * 10}分です"
puts "生まれてから#{Time.new - Time.mktime(1986, 1, 1)}秒経っている"
puts "80年生きるとして、#{(80 * 365) / 7}枚ぐらいかな"
puts "10億3400万秒生きてるとしたら#{1034000000 / 60 / 60 / 24 / 365}歳"
@machida
machida / gist:6007689
Last active December 19, 2015 19:38 — forked from yucao24hours/gist:6007026
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>カレーのレシピ</title>
</head>
<body>
<h1>カレーのレシピ</h1>
@meesterdude
meesterdude / README.md
Last active March 23, 2017 17:42
emoji_spec is a microgem to put emoji in your rspec output.

Emoji Spec

results Tired of the same, dull rspec output? liven it up with some emoji!

Below are the sets presently available, and their corresponding id. if you don't set an ID, one will be randomly chosen every run. Emoji icons may not render in certain terminals.

(pass, fail, pending)

emoji