Skip to content

Instantly share code, notes, and snippets.

View 2no's full-sized avatar
🤗

Kazunori Ninomiya 2no

🤗
View GitHub Profile
@localpcguy
localpcguy / swipeFunc.js
Created November 17, 2011 16:00
Simple Mobile Swipe function to get the swipe direction
var swipeFunc = {
touches : {
"touchstart": {"x":-1, "y":-1},
"touchmove" : {"x":-1, "y":-1},
"touchend" : false,
"direction" : "undetermined"
},
touchHandler: function(event) {
var touch;
if (typeof event !== 'undefined'){
@devi
devi / hierarchy.php
Last active June 16, 2022 07:21
MySQL "Closure Table" for Kohana based on Bill Karwin design.
<?php defined('SYSPATH') or die('No direct script access.');
/**
* MySQL "Closure Table" for Kohana based on Bill Karwin design.
*
* @link http://www.slideshare.net/billkarwin/models-for-hierarchical-data
* @TODO improve
*
* sql schema:
* CREATE TABLE `closures` (
* `id` int(11) NOT NULL AUTO_INCREMENT,
cui vimでクリップボードを使う。
cUI vimの場合、+clipboardでコンパイルされないためクリップボード機能が使えないようです。
そんな時、fakeclipプラグインを使えば "*Y "*pなどでクリップボードが使えるようになり、他のアプリケーションと連携ができます。
いちいちマウスを触らなく良いので実にありがたい。
fakeclip => http://www.vim.org/scripts/script.php?script_id=2098
各種コマンドについてはvim-users.jpが参考になります。
http://vim-users.jp/2010/02/hack126/
@timkelty
timkelty / config.rb
Created January 11, 2012 15:28
Compass config.rb
# Note that while this file is in our config folder, it is
# symlinked to our site folders, so paths are relative from there
# Require gems and Compass plugins
# require 'rgbapng'
# require 'compass-fancybox-plugin'
require 'compass-growl'
# General
output_style = :expanded
@StanAngeloff
StanAngeloff / simple-imagediff.py
Created February 1, 2012 11:45
Simple Image Diff for Git
#!/usr/bin/env python
# Simple Image Diffs
# ==================
#
# How to Install
# --------------
#
# Download the script somewhere on $PATH as 'simple-imagediff' with +x:
#
@rummelonp
rummelonp / 0-gif.md
Created February 4, 2012 16:25
GIF アニメ分解して Canvas で再生するやつ

GIF アニメ分解して Canvas で再生するやつ

GifVJ
これがクールだったのでどうにかこれを JavaScript で作れないか頑張ってみた(頑張ってる途中)

実験途中経過報告

Burrn!
ランダムで GIF アニメを全画面表示
Enter で再生/停止

@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@buritica
buritica / iosd
Created March 29, 2012 18:52
Enable Remote Inspector on Mobile Safari
#!/bin/bash
# Open iPhone Simulator on default location for XCode 4.3 if found
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
# Open iPhone Simulator on default location for XCode 4.2 if found
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app