Skip to content

Instantly share code, notes, and snippets.

View hiloki's full-sized avatar

Hiroki Tani hiloki

View GitHub Profile
//
// Selector-prefix
// =================================================
//
// @mixin selector-prefix([$prefix], [$propertie], [$values]);
// cria de maneira fácil @extend-Only Selectors, por exemplo: %fz-10px, %fz-20px, %fz-4em...
//
// uso: @include selector-prefix([$prefixo_dos_seletores], [$propriedade], [$valores]);
// exemplo: @include selector-prefix(mr, margin-right, 4px 10px 18px 1em);
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@ahomu
ahomu / test.styl
Created August 29, 2012 07:23
-I でnibにパス通し
// stylus -I "$HOME/node_modules/nib/lib"
@import 'nib';
vendor-prefixes = webkit official
*
background linear-gradient(top, white, black)
box-sizing border-box
transition
@BlackKetchupTea512
BlackKetchupTea512 / sublimetext_default_settings.md
Created September 4, 2012 12:11
Sublime Text 2 のDefault設定ファイルについて

追記

この記事は古いです...。はてなブログの方に完全版を置いてあります。→ http://blue-ham-cake1024.hatenablog.com/entry/2012/09/07/Sublime_Text_2_のDefault設定ファイルを眺める


はてなブログは調子が悪いようなので。

この記事ではDefault設定ファイルにどのような記述がされているか、その記述にどんな意味があるかを一つ一つ見ていきます。実際に設定をカスタマイズしてみたい方は、メニューのPreferencesタブの"Settings - User"からUser設定ファイルを開いてそこでいろいろ試してみましょう。

@balupton
balupton / README.md
Last active January 21, 2017 00:40
DocPad: Paging Solutions

DocPad: Paging Solutions

  • post.html.eco used for displaying prev and next page links on your current page (static site friendly)
  • posts.html.eco used for displaying a content listing, that is split up onto multiple pages (requires dynamic site)
  • paged plugin used for splitting a document into a different pages, very neat (static site friendly)
@ctalkington
ctalkington / grunt.js
Created September 12, 2012 02:44
Grunt Glob to Multi Files Object
// gruntfile dropin used to build a grunt files object with 1:1 structure
function globToMultiFiles(glob, dest, options) {
var path = require('path');
grunt.util = grunt.util || grunt.utils;
dest = grunt.template.process(dest);
options = grunt.util._.defaults(options || {}, {
cwd: '',
@ronkorving
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author: rkorving@wizcorp.jp
var timeouts = {};
@hokaccha
hokaccha / git-export-diff
Created September 22, 2012 02:14
gitの差分のファイルをつくる
#!/bin/sh
set -e
if [ $# -ne 2 -a $# -ne 3 ]; then
echo 'Usage:'
echo ' $ git export-diff <commit> <output_dir>'
echo ' $ git export-diff <commit> <commit> <output_dir>'
exit 1
fi
@ginader
ginader / gist:3802506
Created September 28, 2012 22:58
Update Livereload 2.3.8 to Sass 3.2.1
# 1. in case you haven't installed the latest SASS
$ sudo gem install sass
# 2. now let's symlink the system Sass into the Livereload bundle
cd /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib
sudo mv sass sass-bundled
sudo ln -s /Library/Ruby/Gems/1.8/gems/sass-3.2.1/ sass
# 3. done. enjoy the lovely new features like @content for awesome @media support :-)
@gaspanik
gaspanik / Pandoc-M2H.sublime-build
Created October 28, 2012 02:54
Sublime Text 2 / Pandoc Markdown to HTML5 Build
// for OS X
// Put this file into Sublime Text 2 Packages 'User' directory, and restart ST2.
{
"path": "/usr/local/bin",
"cmd": ["pandoc", "-S", "-s", "-f", "markdown", "-t", "html5", "-o", "$file_path/$file_base_name.html", "$file"],
"working_dir": "$file_path",
"selector": ["source.md", "source.markdown"]
}