Skip to content

Instantly share code, notes, and snippets.

View ww24's full-sized avatar
🏢
≡GO

Takenori Nakagawa ww24

🏢
≡GO
View GitHub Profile
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
error_log(var_export($_SERVER, true));
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
@noqisofon
noqisofon / init.el
Created December 21, 2010 00:10
現在の init.el。
;;; init.el
;(setq debug-on-error t)
;; ===============================================================================
;;
;; Environmental discrimination(環境識別)
;;
;; ===============================================================================
(defvar *run-unix-like-p*
(or (equal system-type 'gnu/linux)
@KOBA789
KOBA789 / a.txt
Created November 25, 2011 13:29
async-without-indent
some
@miio
miio / example.php
Created December 31, 2011 17:11
PHPでクラスとインタフェース 型指定の関係
<?php
interface ExampleInterface{
function getHoge();
function getFuga();
function setAge(int $age);
}
class Example implements ExampleInterface{
function getHoge(){
}
@ww24
ww24 / xhr.js
Created June 17, 2012 02:41
Cross Browser XHR
// XHR
var ajax = function (method, url, data, callback) {
var xhr = /*@cc_on!@*/true ? new XMLHttpRequest() : new XDomainRequest();
xhr.timeout = 3000;
xhr.ontimeout = function () {
alert("timeout");
};
xhr.onerror = function () {
alert("error");
};
@noqisofon
noqisofon / File.append.rb
Created September 15, 2012 07:22
File クラスに append っていうクラスメソッドを追加した感じ。
class File
def self.append(path, text)
File.open( path, "a" ) do |output|
output.puts text
end
end
end
if $0 == __FILE__ then
@raa0121
raa0121 / README.md
Created November 9, 2012 14:16
Ricty Generator に Source Code Pro を食べさせるためのパッチ 改

Ricty Generator に Source Code Pro を食べさせるためのパッチ 改

このGistはRicty Generator に Source Code Pro を食べさせるためのパッチを参考に、複数ウェイトに対応させたものです。

このパッチは Source Code Pro と日本語フォント (Migu 1M Regular) のバランスを見るテストのためのものであり、以下のような不具合があります。

  • ベースライン未調整
  • ラインスペース未調整
  • いくつかのグリフの不具合 (全角スペース含む)
@noqisofon
noqisofon / memo.md
Created November 24, 2012 07:48
メモの一部。

ポリシー?じゃなくて、なんだっけ?

オリジナルページを探して、そこまで飛んでついーとボタンを押す手間を省きたい(URL や、タイトルとかをコピペする手間を省きたい?)。

仕様的な何か

  • 画像が貼ってあるページを「とんじる」すると、そのページの画像の数だけ舞熊ができる?
  • ついーと機能つける?
javascript:(function(){var e=window.open(null,null,"width=480,height=300,menubar=no,toolbar=no,location=no,status=no,resizable=noscrollbars=no"),t=document.createElement("img"),n=[39,53,29,41,14,20],r=function(){var e=Math.ceil(Math.random()*6),s=Math.ceil(Math.random()*n[e-1]);t.setAttribute("src","http://mogashi.no-ip.org/alice/?ep="+e.toString()+"&no="+s.toString());setTimeout(r,1e4)};t.style.margin="0";e.document.body.style.margin="0";e.document.body.style.padding="0";e.document.body.appendChild(t);r()})()
@meltedice
meltedice / application.rb
Created November 22, 2013 07:59
rails 4.0.1 + rails_admin 0.5.0 (sass-rails 4.0.1) + less-rails 2.4.2 sass-rails will overwrite stylesheet_engine setting in config/application.rb via initializer hook. So rails g scaffold and other generators use :scss instead of :less Force set :less as stylesheet_engine via initializer hook to use :less.
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems