This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
let s:dein_root = expand('~/.vim/dein') | |
let s:dein_path = expand(s:dein_root . '/repos/github.com/Shougo/dein.vim') | |
execute 'set runtimepath^=' . s:dein_path | |
call dein#begin(s:dein_root) | |
call dein#add('Shougo/dein.vim') | |
call dein#add('Shougo/vimproc.vim', { | |
\ 'build': 'make' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# specify your favorite filtering tool | |
if [[ -z "$INTERACTIVE_SELECTOR" ]]; then | |
if type fzy >/dev/null 2>&1; then | |
export INTERACTIVE_SELECTOR=fzy | |
elif type peco >/dev/null 2>&1; then | |
export INTERACTIVE_SELECTOR=peco | |
elif type fzf >/dev/null 2>&1; then | |
export INTERACTIVE_SELECTOR=fzf | |
fi | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/screen.c b/src/screen.c | |
index 6e19732..3a8ca3e 100644 | |
--- a/src/screen.c | |
+++ b/src/screen.c | |
@@ -1102,8 +1102,10 @@ char **av; | |
n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 : | |
(eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 : | |
0777; | |
+#if !defined(__CYGWIN__) | |
if (((int)st.st_mode & 0777) != n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'rqrcode' | |
require 'rqrcode_png' | |
str = '日本語てすと' | |
# QRコードで日本語を扱う場合はShift_JISが一般的 | |
# 加えてライブラリの問題なのかASCII-8BITで渡さないとうまくいかない | |
qr_str = str.encode('CP932') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple HTTP echo server written in Go. | |
package main | |
import ( | |
"bytes" | |
"context" | |
"flag" | |
"io" | |
"io/ioutil" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |