Skip to content

Instantly share code, notes, and snippets.

@foo9
foo9 / gist:14a0045b2995a6438625
Created February 19, 2015 08:28
PHP mcrypt module install for Mac OS X Yosemite
$ brew search mcrypt
$ brew install homebrew/php/php55-mcrypt

$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File:         (none)
Scan for additional .ini files in: /Library/Server/Web/Config/php
Additional .ini files parsed:      (none)
@foo9
foo9 / gist:99a5ec94233f77899986
Created February 13, 2015 09:21
Laravel artisan command memo
$ php artisan
Laravel Framework version 5.0.4
Usage:
[options] command [arguments]
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
01 北海道
02 青森県
03 岩手県
04 宮城県
05 秋田県
06 山形県
07 福島県
08 茨城県
09 栃木県
10 群馬県
$ npm install -g git://github.com/mhevery/jasmine-node#Jasmine2.0
@foo9
foo9 / fetchFbLikeCount.js
Created October 10, 2014 13:25
Fetch Facebook Like Count Sample
function fetchFbLikeCount(url) {
return $.ajax({
dataType: 'json',
url: 'http://graph.facebook.com/?id=' + encodeURI(url)
}).done(function(data) {
console.log(url, data.shares);
});
}
var urls = [
@foo9
foo9 / capture.js
Created August 3, 2014 08:40
phantomjs capture.js
var system = require('system');
var url = system.args[1];
var page = require('webpage').create();
page.viewportSize = { width: 1024, height: 800 };
page.open(url, function(status) {
if (status === 'success') {
setTimeout(function() {
page.evaluate(function() {
document.body.style.backgroundColor = 'white';
});
zurb/foundation | https://github.com/zurb/foundation
Semantic-Org/Semantic-UI | https://github.com/semantic-org/semantic-ui/
yui/pure | https://github.com/yui/pure
uikit/uikit | https://github.com/uikit/uikit
sapo/Ink | https://github.com/sapo/Ink/
GumbyFramework/Gumby | https://github.com/GumbyFramework/Gumby
jonikorpi/Golden-Grid-System | https://github.com/jonikorpi/Golden-Grid-System
ThisIsDallas/Simple-Grid | https://github.com/ThisIsDallas/Simple-Grid
iKreativ/Workless | https://github.com/iKreativ/Workless
andhart/bijou | https://github.com/andhart/bijou
$ g++ -std=c++11 hoge.cpp -o hoge
$ ./hoge
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.initConfig
connect:
server:
options:
port: 9000
@foo9
foo9 / gist:9543122
Last active December 4, 2024 17:45
mac mavericks & adobe photoshop cs6 (! you need allow accessibility apps to access.)
-- アプリが起動してない場合
if not application "Adobe Photoshop CS6" is running then
-- 入力ソースをU.S.に切り替える
tell application "System Events" to tell process "SystemUIServer"
tell (menu bar item 1 of menu bar 1 where description is "text input")
click
click menu item "U.S." of menu 1
end tell
end tell