Skip to content

Instantly share code, notes, and snippets.

View shin1x1's full-sized avatar
😀

Masashi Shinbara shin1x1

😀
View GitHub Profile
@bouzuya
bouzuya / server.rb
Last active December 25, 2015 21:49
2013/10/18 Twilio API 勉強会 in 大阪の PHP ハンズオンの Ruby 版。( イベント URL : http://atnd.org/event/E0020002 元ソース https://gist.github.com/shin1x1/7006593 ハッシュタグ #twilioapistudy )
require 'sinatra'
require 'twilio-ruby'
get '/' do
<<-HTML
<!DOCTYPE html>
<meta charset="utf-8">
<title>Twilio API</title>
<ul>
<li><a href="/sample">/sample</a></li>
@hiboma
hiboma / gist:7251089
Last active December 27, 2015 02:19
array_push と [] との比較

array_push と $array[] = $val って何が違うの

  • array_push で配列の要素足すのと、$array[] = $val で配列の要素足すのと何が違うのかわからんので調べた
  • http://pecl.php.net/package/vld を入れると処理系の OPコードを見れる

環境

[vagrant@localhost ~]$ rpm -q php
php-5.3.3-23.el6_4.x86_64
@wokamoto
wokamoto / gist:8841077
Last active August 12, 2017 00:44
[WordPress][Backlog API] CF7 to Backlog
<?php
/*
Plugin Name: WP CF7 to Backlog
Plugin URI:
Description:
Author: wokamoto
Version: 0.0.1
*/
include_once( ABSPATH . WPINC . '/class-IXR.php' );
@yasushiyy
yasushiyy / vagrant_coreos_docker.md
Last active January 28, 2019 11:35
Vagrant + CoreOS + Dockerを利用した開発環境セットアップ

Vagrant + CoreOS + Dockerを利用した開発環境セットアップ

MacOSX + Vagrant + CoreOS + Docker + Ubuntuの環境。

2014年6月11日時点での情報。

  • Version: CoreOS 343.0.0
  • Kernel: 3.14.5
  • Docker: 1.0
<?php
function test($init, $key = 'a')
{
$var = $init;
$var[$key] = 1;
echo var_export($init, true), ': ', is_array($var) ? 1 : 0, "\n";
}
test(null); // OK
@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善