Skip to content

Instantly share code, notes, and snippets.

View oppara's full-sized avatar
:octocat:
::

oppara oppara

:octocat:
::
View GitHub Profile
@hail2u
hail2u / hatena_format.jax
Created May 20, 2011 11:56 — forked from mattn/hatena-edit.txt
はてな記法のVimヘルプ
*hatena_format.jax* はてな記法
==============================================================================
入力支援記法 *hatena_format_input_support*
------------------------------------------------------------------------------
見出し記法 *hatena_format_heading*
>
@hail2u
hail2u / csslint-rules.md
Last active April 29, 2023 14:59
CSSLintのRulesの超訳

訳注

これは超訳です。

CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!

この訳はCSSLintと同じライセンスで提供されます。

Possible Errors

@ha1t
ha1t / gist:1476177
Created December 14, 2011 11:15
2000年前後のWebサイトの8割に実装されていたであろうJavaScript
/* _/_/_/時間によってメッセージを変更_/_/_/*/
function putTime()
{
d=new Date();
h=d.getHours();
if(h<5){document.write("真夜中ですな。テレホ入ってますか?");}
else if(h<11){document.write("おっはよーございます。おげんきですか?");}
else if(h<15){document.write("お昼。ご飯食べた?");}
else if(h<16){document.write("3時。おやつちょうだいです。");}
else if(h<19){document.write("もう暗くなってきたね。");}
@uasi
uasi / brew-install-version.sh
Created June 25, 2012 07:30
brew install-version (a Homebrew command that install a specific version of a formula with ease)
#!/usr/bin/env zsh
if [[ $# -lt 2 ]]; then
print -P "%UUsage%u: brew install-version [install options] FORMULA VERSION"
exit 1
fi
formula=
version=
install_opts=()
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@hayajo
hayajo / changelog_en.md
Last active June 27, 2024 02:39
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@wokamoto
wokamoto / example.php
Created November 15, 2012 11:06
class-wp_post_helper の使い方
<?php
require_once('/path/to/wordpress/wp-load.php');
require_once('class-wp_post_helper.php');
// 初期化
$post = new wp_post_helper(array(
'post_name' => 'slug' , // スラッグ
'post_author' => 1 , // 投稿者のID
'post_date' => '2012/11/15 20:00:00' , // 投稿時刻
'post_type' => 'posts' , // 投稿タイプ(カスタム投稿タイプも指定できるよ)
@yuya-matsushima
yuya-matsushima / RTrim.vim
Last active December 10, 2015 00:39
保存時に実行する末尾スペース削除処理のうち、Markdownだけ都合がわるいのでちょっと変える
function! RTrim()
let s:cursor = getpos(".")
if &filetype == "markdown"
%s/\s\+\(\s\{2}\)$/\1/e
match Underlined /\s\{2}/
else
%s/\s\+$//e
endif
call setpos(".", s:cursor)
endfunction
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
# open current directory in Finder
alias f='open .'
# cd to the path of the front Finder window
cdf() {
target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
if [ "$target" != "" ]; then
cd "$target"; pwd
else
echo 'No Finder window found' >&2