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
#!/usr/bin/php -q
<?php
/* a2addsite - てwきwとwうw自分用apache2サイト追加スクリプト */
/* 最初は10行ぐらいだったんだけどねwwwwwwww */
ob_end_clean();
//放り込んでいくディレクトリ(最後にスラッシュ付ける)
$a2confdir = '/etc/apache2/sites-available/';
//DocumentRootが存在しない場合は作成を試みるか
@xtian
xtian / html5boilerplate.jade
Last active December 23, 2023 15:05
HTML5 Boilerplate in jade
!!! 5
html(class='no-js')
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
title
meta(name='description', content='')
meta(name='viewport', content='width=device-width, initial-scale=1')
@repeatedly
repeatedly / d_master.md
Last active June 8, 2023 06:20
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@unbracketed
unbracketed / export_repo_issues_to_csv.py
Last active August 3, 2023 18:13
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
@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

@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
@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)。

はじめに

@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言語は習得していますか?」「申し訳ございません 未習得です」

@deris
deris / vim_keymapping.md
Created May 2, 2013 10:01
vimで使うキーの機能使用頻度と打ちやすさの整理

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

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

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

@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))