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
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
# 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
<?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
<?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
// ==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
var dispatcher = { | |
dispatchees: [], | |
connect: function (pattern, action, options) { | |
dispatcher.dispatchees.push({ | |
pattern: pattern, | |
action: action, | |
options: options || {} | |
}); |
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
#!/bin/sh | |
perlbin=`which perl` | |
phpbin=`which php` | |
rubybin=`which ruby` | |
pythonbin=`which python` | |
if [ -x $perlbin ]; then | |
echo -n "==================================================\n" | |
echo "Perl Paths" |
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 | |
namespace URI\RegExp\Pattern { | |
# | |
# Patterns used to parse URI's | |
# | |
# RFC 2396 (URI Generic Syntax) | |
# RFC 2732 (IPv6 Literal Addresses in URL's) | |
# RFC 2373 (IPv6 Addressing Architecture) |
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"?> | |
<s:Application xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" minHeight="400" creationComplete="creationCompleteHandler(event)"> | |
<fx:Script> | |
<![CDATA[ | |
import mx.events.VideoEvent; | |
import mx.events.SliderEvent; | |
private var playheadTimeSliderDragging:Boolean = false; |