Skip to content

Instantly share code, notes, and snippets.

View pasela's full-sized avatar

Yuki pasela

  • Japan
View GitHub Profile
@pasela
pasela / README.md
Created August 22, 2012 06:18
mintty: A soft pastel color theme(xoria256) for mintty

A soft pastel color theme for mintty

This is ported version of color theme xoria256.

screenshot

Settings

Merge mintty-color-xoria256-rc into your .minttyrc

@pasela
pasela / README.md
Created August 21, 2012 07:03
mintty: A pastel color theme for mintty

A pastel color theme for mintty

screenshot

Settings

Merge mintty-color-pastel-rc into your .minttyrc

or

@pasela
pasela / capture3_with_timeout.rb
Last active October 18, 2023 18:33
[ruby] capture3_with_timeout
# encoding: utf-8
require "timeout"
# Capture the standard output and the standard error of a command.
# Almost same as Open3.capture3 method except for timeout handling and return value.
# See Open3.capture3.
#
# result = capture3_with_timeout([env,] cmd... [, opts])
#
@pasela
pasela / error_handling_example.sh
Created November 21, 2012 07:35
[bash]error handling and error report example
#!/bin/bash
#
# error handling and error report example
#
set -e
# logfile
LOGFILE=`mktemp`
@pasela
pasela / cakephp2.conf
Created July 5, 2012 09:37
nginx configuration example for CakePHP 2.x
#
# nginx configuration example for CakePHP 2.x
#
server {
listen 80;
server_name cakephp2.example;
root /var/www/cakephp2/app/webroot;
access_log /var/log/nginx/cakephp2.access.log;
error_log /var/log/nginx/cakephp2.error.log;
@pasela
pasela / git-su
Last active January 17, 2023 13:05
git-su - switches user and sshCommand in the current repository
#!/bin/bash
#
# git-su - Git Switch User
# ========================
#
# git-su switches user and sshCommand in the current repository.
#
# USAGE
# -----
#
@pasela
pasela / go-http-proxy.go
Created April 4, 2018 05:16
Simple HTTP proxy server written in Go.
// Simple HTTP proxy server written in Go.
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"net/http/httputil"
@pasela
pasela / gist:6051206
Last active May 18, 2022 20:34
[alfred] Open ssh in iTerm (Alfred Workflow)
tell application "iTerm"
activate
tell the first terminal
set ssh_session to (make new session at end of sessions)
tell ssh_session
exec command "ssh {query}"
end tell
end tell
end tell
@pasela
pasela / git-fix-author-committer
Last active May 14, 2021 19:40
git-fix-author-committer - Apply filter-branch --commit-filter easily
#!/bin/bash
#
# Apply filter-branch --commit-filter easily
#
# Author: Yuki <paselan@gmail.com>
# License: MIT License
#
PROGNAME=$(basename $0)
SUBCMDNAME=${PROGNAME#git-}
@pasela
pasela / go-http-echo.go
Created April 4, 2018 05:17
Simple HTTP echo server written in Go.
// Simple HTTP echo server written in Go.
package main
import (
"bytes"
"context"
"flag"
"io"
"io/ioutil"
"log"