Skip to content

Instantly share code, notes, and snippets.

View naokazuterada's full-sized avatar
🌏
hello world!

Naokazu Terada naokazuterada

🌏
hello world!
View GitHub Profile
@cowboy
cowboy / finder-open-iterm-here.scpt
Created April 6, 2011 12:10
Finder Open iTerm Here: Drop a folder on this script (or just run it) to open a new iTerm window there. If the selected item isn't a folder, it will open the item's parent folder. Great when bound to a hotkey in FastScripts or added to the Finder Sidebar
(*
* Finder Open iTerm Here - v1.0.2 - 4/14/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*)
tell application "Finder"
@nissuk
nissuk / _.php
Last active November 26, 2020 03:58
PHP: Noticeエラーを回避してarrayから値を取得するいくつかの例
<?php
error_reporting(E_ALL);
// 通常の取得
// 配列のキーに値がない場合、Notice: Undefined index が発生します。
$foo = $_GET['foo'];
$bar = $_GET['bar'];
$baz = $_GET['baz'];
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kishikawakatsumi
kishikawakatsumi / ImageUpload.m
Created November 23, 2011 15:13
Upload image to Twitter with OAuth
#define DATA(str) [(NSString*)(str) dataUsingEncoding:NSUTF8StringEncoding]
- (NSData *)generateFormData:(NSDictionary *)dictionary boundary:(NSString *)boundary {
NSMutableData *data = [[NSMutableData alloc] init];
id key;
NSEnumerator *enumerator = [dictionary keyEnumerator];
while (key = [enumerator nextObject]) {
id value = [dictionary valueForKey:key];
[data appendData:DATA(([NSString stringWithFormat:@"--%@\r\n", boundary]))];
@Takazudo
Takazudo / gfm.rb
Created March 27, 2012 15:25 — forked from peterhellberg/gfm.rb
GitHub Flavored Markdown parser for use with Jekyll and Marked.app
#!/usr/bin/env ruby
require 'rubygems'
require 'redcarpet'
require 'pygments.rb'
class HTMLwithPygments < Redcarpet::Render::HTML
def block_code(code, language)
Pygments.highlight(code, :lexer => language.to_sym, :options => {
:encoding => 'utf-8'
})
@christianhanvey
christianhanvey / gist:2768300
Created May 22, 2012 10:51
Update resource fields on save (MODX Revo 2.2)
<?php
/*
Update resource fields when they are saved
trigger on the following system events:
OnBeforeDocFormSave
OnDocFormSave
note: changing / inserting tv values is better done onDocFormSave as the process for saving tvs onBeforeDocFormSave is much more complicated (apparently)
@gyrus
gyrus / gist:3155982
Created July 21, 2012 14:40
Rename WordPress "Posts" to "News"
<?php
/**
* Rename "Posts" to "News"
*
* @link http://new2wp.com/snippet/change-wordpress-posts-post-type-news/
*/
add_action( 'admin_menu', 'pilau_change_post_menu_label' );
add_action( 'init', 'pilau_change_post_object_label' );
function pilau_change_post_menu_label() {
@s-hiroshi
s-hiroshi / functions.php
Created August 24, 2012 08:30
WordPress >snippets > custom field on custom post type example
// カスタム投稿タイプ
function create_example(){
$labels = array(
'name' => 'サンプル',
'singular_name' => 'サンプル',
'add_new' => 'サンプルを追加',
'add_new_item' => '新しいサンプルを追加',
'edit_item' => 'サンプルを編集',
'new_item' => '新しいサンプル',
'view_item' => 'サンプルを編集',
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@gaspanik
gaspanik / st2pkgs-for-webdev.markdown
Last active January 18, 2021 09:05
ST2: Sublime Text 2 Packages for Web Developers.

Recommended Sublime Text 2 Packages for Web Developers.

Update

  • 「Browser Support」を追加しました。

2013 Spring & Summer

こもりが使っているモノやそうでないものも含め、なんとなくWebデザイナーやWebデベロッパーな人たちに便利そうなのを集めてみました。