Skip to content

Instantly share code, notes, and snippets.

Avatar

Yuki pasela

  • Japan
View GitHub Profile
@pasela
pasela / download_latest_minecraft_server.sh
Created Dec 12, 2013
Download latest minecraft_server.jar
View download_latest_minecraft_server.sh
#!/bin/bash
DOWNLOAD_PAGE=https://minecraft.net/download
url=$(curl -Ss "$DOWNLOAD_PAGE" | grep -ohE 'http.[^"]+/minecraft_server\.[^"]+\.jar')
if [[ -n "$url" ]]; then
curl -O "$url"
fi
@pasela
pasela / git-fix-author-committer
Last active Dec 30, 2015
git-fix-author-committer - Apply filter-branch --commit-filter easily
View git-fix-author-committer
#!/bin/bash
#
# Apply filter-branch --commit-filter easily
#
# Author: Yuki <paselan@gmail.com>
# License: MIT License
#
PROGNAME=$(basename $0)
SUBCMDNAME=${PROGNAME#git-}
@pasela
pasela / pre-commit
Last active Dec 27, 2015
[git] Prevent commits from default user.
View pre-commit
#!/bin/sh
git config user.name >/dev/null && git config user.email >/dev/null
if [ $? -ne 0 ]; then
cat <<EOF
Error: Attempt to commit by default user.
$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>
Please set user.name and user.email using following commands.
@pasela
pasela / fizzbuzz.html
Created Nov 3, 2013
FizzBuzz with Twitter Bootstrap pagination.
View fizzbuzz.html
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>FizzBuzz</title>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css" />
<style>
h1 {
@pasela
pasela / git-su
Last active Mar 29, 2020
git-su - switches user and sshCommand in the current repository
View git-su
#!/bin/bash
#
# git-su - Git Switch User
# ========================
#
# git-su switches user and sshCommand in the current repository.
#
# USAGE
# -----
#
@pasela
pasela / Pinky_terminal.png
Last active Dec 22, 2015
A Pinky color theme for iTerm2 and Terminal.app
@pasela
pasela / private.xml
Created Sep 3, 2013
[KeyRemap4MacBook] LeaveInsMode with EISUU(vim keybind apps)
View private.xml
<?xml version="1.0"?>
<root>
<symbol_map type="KeyCode" name="[" value="0x1e" />
<appdef>
<appname>iTERM2</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<list>
<item>
<name>LeaveInsMode with EISUU(vim keybind apps)</name>
@pasela
pasela / padat.vim
Last active Dec 21, 2015
[vim] A dark color theme for vim-airline
View padat.vim
" vim-airline theme
"
" padat
" A dark color theme for vim-airline.
"
" Author: Yuki <paselan at Gmail.com>
" Last Change: Wed, 21 Aug 2013 09:53:56 +0900
"
" License: MIT License {{{
" Permission is hereby granted, free of charge, to any person obtaining
@pasela
pasela / gist:6051206
Last active Dec 20, 2015
[alfred] Open ssh in iTerm (Alfred Workflow)
View gist:6051206
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 / rspec.vim
Created May 27, 2013
[vim] RSpec filter for ctrlp-funky
View rspec.vim
" Language: Ruby (rspec)
" Author: pasela
" License: The MIT License
" ctrlp-funky-rspec provides filters for RSpec. It only provides 'describe'
" block by default. You can enable more blocks by options.
"
"
" g:ctrlp_funky_rspec_examples (default: 0)
"
You can’t perform that action at this time.