Skip to content

Instantly share code, notes, and snippets.

@fnhipster
fnhipster / html5.haml
Created April 9, 2011 01:19
HTML5 HAML Template
!!! 5
%html
%head
%title= "Your Website"
%meta{ :content => "", :name => "description" }
%meta{ :content => "", :name => "author" }
%meta{ :content => "3 days", :name => "revisit-after" }
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }
@gvarela
gvarela / Gemfile
Created May 5, 2011 16:30
web sockets with eventmachine and redis pub/sub
# A sample Gemfile
source "http://rubygems.org"
gem "redis"
gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git'
gem "em-hiredis"
# gem "em-synchrony"
gem "em-websocket"
@darktable
darktable / .hgignore
Created February 20, 2012 03:40
hg: Starter hgignore file for Unity3D projects
syntax: glob
.DS_Store
*.sln
*.userprefs
*.csproj
*.pidb
*.unitypackage
syntax: regexp
^Build/.*
@romichi
romichi / templateMatch.py
Created May 22, 2012 16:27
openCVでテンプレートマッチング
# -*- coding:utf-8 -*-
import cv
number = cv.LoadImage('number.png') #比較対象画像
template = cv.LoadImage('five.png') #テンプレート
result = cv.CreateImage((number.width - template.width + 1, #結果を入れる領域の作成
number.height - template.height + 1), 32, 0)
@repeatedly
repeatedly / msgpack_issue_121.md
Last active November 30, 2021 02:09
MessagePackが文字列とバイナリをわけないのは問題?

MessagePackが文字列とバイナリをわけないのは問題?

msgpack/msgpack#121

Objective Cの実装使ってるとある問題にぶちあたった.なので,文字列をちゃんとバイナリ(Raw)と分けるべき,という提案

(*) 俺は熟読したわけではないので,中身が気になる人はちゃんと本スレを読みましょう

そもそもMessagePackとは

すぐれた PHP ライブラリとリソース

Awesome PHP の記事をフォークして翻訳したものです (2013年4月25日)。おどろくほどすごい PHP ライブラリ、リソースやちょっとした情報のリストです。

【訳者コメント】 PHP 入門者のかたにはクィックリファレンスとして PHP: The Right Way 、セキュリティに関しては2011年3月に出版された 体系的に学ぶ 安全なWebアプリケーションの作り方 をおすすめします。

Composer

using System.IO;
using Excel;
using UnityEditor;
using UnityEngine;
public class ExcelDatalProcessor : AssetPostprocessor
{
//出力先.
private static readonly string exportPath = "Assets/Terasurware/App Data xlsx.asset";
anonymous
anonymous / gist:6826502
Created October 4, 2013 14:08
Gradle設定例
buildscript {
repositories {
mavenCentral()
mavenRepo urls: 'http://twitter4j.org/maven2'
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
classpath 'com.googlecode.androidannotations:androidannotations:2.7.1'
classpath 'com.googlecode.androidannotations:androidannotations-api:2.7.1'
classpath 'com.h2database:h2:1.3.173'
@hayajo
hayajo / gist:7982694
Created December 16, 2013 05:27
AngularJS の $http.post でリクエストパラメータが JSON じゃ困っちゃう感じなのでデフォルトを form-urlencoded にする
var module = angular.module('myApp');
module.config(function ($httpProvider) {
$httpProvider.defaults.transformRequest = function(data){
if (data === undefined) {
return data;
}
return $.param(data);
}
$httpProvider.defaults.headers.post = {
@shield-9
shield-9 / config
Created March 8, 2014 10:46
GitでPullを高速化する方法。.git/configを次のように編集
[remote "origin"]
+ url = git://github.com/shield-9/opcache-dashboard.git
+ pushurl = git@github.com:shield-9/opcache-dashboard.git
- url = git@github.com:shield-9/opcache-dashboard.git