Skip to content

Instantly share code, notes, and snippets.

View kaosf's full-sized avatar
🏠
Working from home

ka kaosf

🏠
Working from home
View GitHub Profile
@penguin2716
penguin2716 / 60_warnning.zsh
Created July 8, 2014 10:36
source this script in your ~/.bashrc and stop using deprecated package
#!/usr/bin/env zsh
function arp {
echo "use 'ip n' instead."
return 1
}
function ifconfig {
echo "use 'ip a (ip addr)', 'ip link', or 'ip -s (ip -stats)' instead."
return 1
@a2ikm
a2ikm / HOW
Last active August 29, 2015 14:02
patch for git's diff-highlight to show utf8 strings properly. originally from https://gist.github.com/kaosf/d361cd5169fb36297d9c
$ wget https://raw.githubusercontent.com/git/git/34d9819e0a387be6d49cffe67458036450d6d0d5/contrib/diff-highlight/diff-highlight
$ wget https://gist.githubusercontent.com/a2ikm/2dbfb89114dfa5c543ed/raw/e2d8d550ef601c9310712f4187b803658427dd42/diff-highlight.utf8.patch
$ patch -u diff-highlight < diff-highlight.utf8.patch
$ chmod +x diff-highlight
@penguin2716
penguin2716 / hello.sh
Created May 8, 2014 03:05
"Hello, world!"と出力するシェルスクリプト
#!/bin/bash
cat <<EOF > hello.c
#include <stdio.h>
int main(void) {
printf("Hello, world!\n");
return 0;
}
EOF
gcc -o hello hello.c
@kazuhito-m
kazuhito-m / send_mail_lowlevel.sh
Last active December 24, 2015 15:28
サーバに入った際「コマンドを自由にビルド・パッケージインストール出来ない場合」に補うための"超原始的"スクリプト群(bash)。 メール送信。
#!/bin/bash
# メール送信関数
#
# smtpサーバ未設定のmailコマンドや、sendmailコマンドが無いサーバでも実行できるように、
# bash & 少しのコマンドで送れる、原始的なものです。
#
# 前提/制約
#
# * 右記のコマンドが実行できること expect telnet cat echo whoami hostname base64
@seymores
seymores / gcm-clojure.clj
Last active September 9, 2017 13:54
Use gcm-server from clojure
;;; Project here: https://github.com/seymores/gcm-clj
;;;
;;; Note: you need to specify the custom repo to get gcm-server.jar
;;; :repositories [["google" "https://github.com/slorber/gcm-server-repository/raw/master/releases"]]
;;; :dependencies [[com.google.android.gcm/gcm-server "1.0.2"]]
;;;
;;; See http://developer.android.com/google/gcm/gs.html#server-app
;; Import all the needed classes from gcm-server.jar
(import (com.google.android.gcm.server Sender Message Message$Builder MulticastResult))
@deris
deris / vim_keymapping.md
Created May 2, 2013 10:01
vimで使うキーの機能使用頻度と打ちやすさの整理

vimで使うキーの機能使用頻度と打ちやすさの整理

vimで使うキーの機能使用頻度と打ちやすさを整理してみました。 今回整理したのはnormalモードについてだけです。 機能の使用頻度と打ちやすさは、完全に個人の見解です。 キーボードによっても打ちやすさは変わると思います。

すべてのキーを網羅しているわけではありません。

@repeatedly
repeatedly / d_risk.md
Last active January 22, 2022 07:31
ついに顕在化し始めてもいない「D言語リスク」

ついに顕在化し始めてもいない「D言語リスク」

英語圏ではかなり前からD言語を開発し続けることのリスクについて語られていたが,全く具体的な弊害が出て来こないので,単なるメモ.日本ではかなり遠い未来だと思う.

古手エンジニアの不足

COBOLのように需要が逼迫しているのに人材の供給が増えず需給ミスマッチが起っているわけでは無く,需要も供給も増えないという状況下でわずかすら需要が上回っていないつも通りの状況がD言語に起きている.特に深刻なのは高価な古手エンジニアの採用が絶望的に難しいという現実だ.Haskellが台頭して数年経ちScalaがメインストリームの先頭を突っ走る2013年において新しくD言語を勉強しようとする年長はよほどの物好きしかいない.20~30歳のD言語エンジニアを雇うのはそれほど難しく無いだろうがコストがかかる.高価な40代前半の古手エンジニアを雇いたいという企業の思いとは裏腹にD言語を新たに学ぶ年長は絶滅寸前だ.

とても優秀な古手を雇用できるチャンスが巡って来た.採用担当者はこう尋ねる.「D言語は習得していますか?」「もちろんALGOL/Fortran/COBOLはお手の物です.Emacs Lispもある程度可能です」「もう一度伺いますがD言語は習得していますか?」「申し訳ございません 未習得です」

@ponkore
ponkore / clojure-reader-macro.md
Created December 3, 2012 15:32
Clojure のリーダーマクロについて (lisp reader macro advent calendar 2012 の記事です)。

Clojure のリーダーマクロについて

この記事は、lispリーダーマクロアドベントカレンダー の4日目の記事です。 タイトルにある通り、Clojure でのリー ダーマクロについて取り扱います(対象とする Clojure のバージョンは 1.4)。

はじめに

@joemiller
joemiller / netpps.sh
Last active January 12, 2024 15:39
shell: quick linux scripts for showing network bandwidth or packets-per-second
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second
@crh
crh / backbone-tutorial.md
Created October 8, 2012 12:16
Backbone & Yeoman

Backbone.js and yeoman

description

this is a list tutorials for building web application using backbone.js and yeoman. We are building a Photo Gallery JS App from Backbone Fundamentals

Requirements