Skip to content

Instantly share code, notes, and snippets.

View shotasenga's full-sized avatar

Shota Senga shotasenga

  • Canada
View GitHub Profile
@shotasenga
shotasenga / step-frames.scss
Created March 7, 2015 18:07
SCSS mixin instead of `steps()` timing function. some old Android browsers not supported steps() timing function.
@mixin step-frames($steps, $fromX, $fromY, $toX, $toY){
$i: 0;
$frame: 0;
@while $frame < 100 {
@if $frame > 0{
#{$frame - 0.00001}% {
background-position: #{($toX - $fromX) / $steps * ($i - 1)}px #{($toY - $fromY) / $steps * ($i - 1)}px;
}
}
@shotasenga
shotasenga / wp_remove_accesskeys.user.js
Created October 2, 2013 19:08
WordPressの投稿画面のショートカットを全部無効にするuser script http://senta.me/blog/wordpress/wp-post-is-bad/
// ==UserScript==
// @name WP Remove Accesskeys
// @namespace senta.me
// @description WordPressのアクセスキーを削除する。
// @include http://*/wp-admin/post.php*
// @include http://*/wp-admin/post-new.php*
// ==/UserScript==
(function(){
window.addEventListener("load",function(){
var els = document.getElementsByTagName("input");
@shotasenga
shotasenga / pre-commit
Created September 14, 2013 02:43
Git pre-commit hook. user.name, user.email がローカルにセットされていなければコミットさせない。
#!/bin/sh
## fork from http://qiita.com/uasi/items/a340bb487ec07caac799
if [ -z "`git config --local user.name`" ]; then
echo "fatal: user.name is not set locally"
exit 1
fi
if [ -z "`git config --local user.email`" ]; then
echo "fatal: user.email is not set locally"
exit 1