Skip to content

Instantly share code, notes, and snippets.

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

mpyw mpyw

🏠
Working from home
View GitHub Profile
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
@walkie
walkie / mips.sty
Last active March 28, 2025 14:38
MIPS Assembly language definition for the LaTeX listings package.
% MIPS Assembly language definition for the LaTeX `listings' package
%
% The list of instructions and directives are those understood by the
% MARS MIPS Simulator [http://courses.missouristate.edu/KenVollmar/MARS/]
%
% Author: Eric Walkingshaw <[email protected]>
%
% This code is in the public domain.
%
% Here is an example style. I like it for slides, but you might want
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active August 9, 2025 03:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@hbsnow
hbsnow / CheckBrowser.class.php
Last active November 14, 2016 02:13
PHPでブラウザを振り分けるクラス。振り分けそのものはそこまで厳密なものではなく、IEをのぞくほとんどのブラウザのユーザは常に最新のブラウザを使用していると想定している。
<?php
/**
* ブラウザをゆるく判別
*
* @version 1.2.2
*/
class CheckBrowser
{
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

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

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

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@kennyj
kennyj / gist:4966002
Last active November 28, 2024 18:15
ハイフン付き電話番号に分割
# encoding: utf-8
module TelSplitter
MAP = {
# 市外局番 , 市内局番の桁数のマップ
# http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html のデータを利用
# 固定電話以外の桁数は適当です...
'050' => 4, # IP電話
'070' => 4, # 携帯電話/PHS
'080' => 4, # 携帯電話
@etheriqa
etheriqa / innodb-lock.md
Created March 12, 2013 19:22
[InnoDB] 非ユニークキーによる行ロックの範囲についてちょっと調べた

[InnoDB] 非ユニークキーによる行ロックの範囲についてちょっと調べた

バージョン

% mysql --version
mysql  Ver 14.14 Distrib 5.5.29, for debian-linux-gnu (x86_64) using readline 6.2

調査方法

@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@cobusc
cobusc / postgresql_date_function_index_howto.md
Last active July 26, 2024 09:16
Short explanation of the issues faced when trying to create a PostgreSQL index using the date() function and how to resolve it.
@tbrianjones
tbrianjones / free_email_provider_domains.txt
Last active August 2, 2025 20:29
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com