This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FaceBook Auto Poke | |
// @namespace ns.aerith.sc | |
// @include http://www.facebook.com/* | |
// ==/UserScript== | |
(function () { | |
var target_id = 'pagelet_netego_pokes'; | |
var container = document.getElementById(target_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 文字列が正規表現パターンかどうかをそれっぽく判別する関数。 | |
*/ | |
function regexpUses($pattern) | |
{ | |
// See: http://php.net/manual/reference.pcre.pattern.modifiers.php | |
// See: http://php.net/manual/regexp.reference.delimiters.php | |
if (preg_match('@^([^\s\\\\a-z0-9])(?:.*?)\1(?:[imsxeADSUXJu]*)?$@mD', $pattern)) return true; | |
if (preg_match('@^\{(?:.*?)\}(?:[imsxeADSUXJu]*)?$@mD', $pattern)) return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
array_map(function ($i) { $s=($i%3==0?'Fizz':'').($i%5==0?'Buzz':''); $s=($s=="")?$i:$s; print "${s}\n"; }, range(1,100)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aerith@www2381u:~$ view .vhosts/llll.aerith.sc.conf | |
<VirtualHost *:80> | |
ServerName llll.aerith.sc | |
DocumentRoot /home/aerith/.sites/llll.aerith.sc/htdocs | |
ErrorLog /var/log/apache2/llll.aerith.sc.error.log | |
CustomLog /var/log/apache2/llll.aerith.sc.access.log vhost_combined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('sys'); | |
process.stdout.write(sys.inspect(pathExistsSync('test'), true, null) + "\n"); | |
process.stdout.write(sys.inspect(pathExistsSync('--test--'), true, null) + "\n"); | |
function pathExistsSync (path) { | |
var fs = require('fs'); | |
try { | |
var stat = fs.statSync(path); | |
} catch (error) { | |
return (error.errno !== process.ENOENT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mx:VBox width="100%" height="100%"> | |
<mx:Repeater id="rp" startingIndex="0" recycleChildren="false"> | |
<flexlibContainer:WindowShade id="windowShade" width="100%" data="{rp.currentItem}" opened="false"> | |
<flexlibContainer:headerRenderer> | |
<mx:Component> | |
<flexlibControl:CanvasButton | |
xmlns:mx="http://www.adobe.com/2006/mxml" | |
width="100%" | |
creationComplete="creationCompleteHandler(event)" | |
click="headerClickHandler(event)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="600" height="400" paddingLeft="0" paddingTop="0" paddingBottom="0" paddingRight="0" creationComplete="creationCompleteHandler()"> | |
<mx:Script> | |
<![CDATA[ | |
import mx.binding.utils.BindingUtils; | |
import flash.net.URLLoader; | |
import flash.net.URLRequest; | |
import flash.net.URLVariables; | |
import mx.collections.XMLListCollection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
require 'pathname' | |
get '*' do | |
base = Pathname.new(File.dirname(__FILE__)).parent | |
path = @params[:splat].first.gsub(/^\//, '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //> | |
$item = "hoge"; | |
$values = array( | |
array( | |
'id' => 1, | |
'title' => 'title1', | |
), | |
array( | |
'id' => 2, | |
'title' => 'title2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
<!-- | |
var $ = function (id) { return document.getElementById(id); }; | |
window.onload = function () { | |
var images = $('image-list').getElementsByTagName('img'); | |
for ( var i = 0; i < images.length; i++ ) { |