Skip to content

Instantly share code, notes, and snippets.

View 2no's full-sized avatar
🥳

Kazunori Ninomiya 2no

🥳
View GitHub Profile
@zonak
zonak / grunt_watch_usage.md
Created April 9, 2012 20:08
A usage scenario of the extended version of grunt.file.expandFiles

A usage scenario of the extended version of grunt.file.expandFiles that has the added feature of providing lists of:

  • all - set of all files matching the src definition of the task (default option)
  • changed - set of files matching the src definition of the task that have been changed since the last iteration of the watch task
  • deleted - set of files matching the src definition of the task that have been deleted since the last iteration of the watch task

The task execution would go something like this:

  • check for changed files:
@johnantoni
johnantoni / mysql.txt
Created August 7, 2012 18:57
mysql + vagrant + remote access
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
@jugyo
jugyo / gist:3521894
Created August 30, 2012 02:56
Vagrant の使い方
@Gab-km
Gab-km / github-flow.ja.md
Last active July 1, 2025 15:44 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@mvriel
mvriel / gist:3822861
Created October 2, 2012 19:49
Option arrays in PHPDoc
<?php
/*
This code sample demonstrates several style for representing an option array with
the following fields: name, label, type_id, visible, default.
When designing this we should keep in mind that the option key may be represented
by either a literal or a (class)constant. As such we mix and match those for
illustrative purposes.
*/
@kiyotune
kiyotune / find_much_conditions.sh
Created October 3, 2012 08:38
複数のディレクトリを除外してfindしてあれこれする
# 除外するディレクトリ:.svn, vendors, data, tmp, tests
# ファイル一覧を表示
find ./ -type d \( -name '.svn' -o -name 'vendors' -o -name 'data' -o -name 'tmp' -o -name 'tests' \) -prune -o -type f -print
# ファイル名(*.php)で絞り込み
find ./ -type d \( -name '.svn' -o -name 'vendors' -o -name 'data' -o -name 'tmp' -o -name 'tests' \) -prune -o -type f -name '*.php' -print
# 複数のディレクトリをまたいだファイルの一括検索
find ./ -type d \( -name '.svn' -o -name 'vendors' -o -name 'data' -o -name 'tmp' -o -name 'tests' \) -prune -o -type f -name '*.php' -print | xargs grep 'test_string'
@amoilanen
amoilanen / webcrawler.js
Last active March 24, 2022 03:14
Simple PhantomJS-based web crawler library
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
@hayajo
hayajo / changelog_en.md
Last active April 1, 2025 14:37
ChangeLog を支える英語

ChangeLog を支える英語

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

ほとんど引用です。

基本形

@AvnerCohen
AvnerCohen / npm-cheat-sheet.md
Last active June 9, 2025 07:26
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

List of less common (however useful) NPM commands

Prepand ./bin to your $PATH

Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

@ahomu
ahomu / ajax_page.html
Created November 21, 2012 23:40
PhantomJSでStatic HTML生成するぞ君
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Ajax Page</title>
</head>
<body style="background-color: #fff;">
<h1>Ajax的にナニかするよー</h1>
<div id="content">
<p>loading...</p>
</div>