Skip to content

Instantly share code, notes, and snippets.

View serima's full-sized avatar
🌎

Ryo Shibayama serima

🌎
View GitHub Profile
@BugRoger
BugRoger / ssh-background
Created January 21, 2011 16:02
Changes iTerm2's background color based on host configuration
#!/bin/bash
# Installation:
# 1. Save this script to /some/bin/ssh-background
# 2. chmod 755 /some/bin/ssh-background
# 3. alias ssh=/some/bin/ssh-background
# 4. Configure your host colors below.
set_color() {
local HEX_FG=$1
local HEX_BG=$2
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@hayajo
hayajo / changelog_en.md
Last active May 3, 2024 08:29
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
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:

@y-ken
y-ken / nginx.conf
Last active November 19, 2019 08:11
流れに乗ってnginxのログフォーマットにLTSVを採用しました。 2013/03/05リリースのfluentd-0.10.32.gemなら標準のin_tailで、format ltsvとする事でそのまま読み込めます。 proxy先からの応答時間や送出したcookieも記録する汎用的な設定です。
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format ltsv 'domain:$host\t'
'host:$remote_addr\t'
'user:$remote_user\t'
'time:$time_local\t'
'method:$request_method\t'
'path:$request_uri\t'
@yoonchulkoh
yoonchulkoh / SBDataMail.rb
Created January 27, 2014 23:56
My SoftBank通信量確認画面の情報をスクレイピングしてメール通知するスクリプト
require "mechanize"
require "yaml"
# 設定ファイル
config = YAML.load_file("config.yml")
# スクレイピング準備
agent = Mechanize.new
agent.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36"
agent.max_history = 1
@CMCDragonkai
CMCDragonkai / bisecting_binary_search.php
Last active April 2, 2023 01:57
PHP: Bisect Left & Bisect Right using Binary Search (similar to Python's bisect_left & bisect_right). Binary search only works on sorted arrays. Arrays must be first sorted with quick sort. Bisect right finds the index of a value where all the elements from left to right up to the index is less or equal to the value: Array: [1, 1, 2, 2, 3, 4] Va…
<?php
// sorted array must be a 0 indexed
// left most index, right most index all inclusive
// finds all of the elements coming from the left to the right that is less or equal to the key
function bisect_right($sorted_array, $key, $left = null, $right = null){
if(is_null($left)){
reset($sorted_array);
$left = key($sorted_array);
@nakamura244
nakamura244 / tech.md
Last active May 27, 2018 01:09
makuakeが利用している技術

makuakeが利用している技術

サービス

https://www.makuake.com/

どんなサービス?

クラウドファンディングサービス

インフラ

awsで下記あたり。

@syokunin
syokunin / validation.php
Last active December 30, 2021 02:45
Laravel 5.1 日本語バリデーションメッセージファイル
<?php // resources/lang/ja/validation.php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by