This file contains hidden or 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 | |
$content = file_get_contents('./test.txt'); | |
$config = array( | |
'assocArray' => true, | |
); | |
$content = preg_replace_callback('/(\$\{(.*?)\}|\{\{\w+\s(.*?)\}\})/s', function($m) use($config) { | |
$subject = $m[1]; |
This file contains hidden or 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
'use strict' | |
var DEFINE_NOT_WRITABLE = {writable: false}; | |
/** | |
* Base Class of OOP feature | |
* | |
// e.g 1 | |
var Klass = klass.of({ | |
constructor: function() { |
This file contains hidden or 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 PARALLEL_LIMIT = 3; | |
var Page = require('webpage'); | |
var async = require('./async.js'); | |
var i = 0, iz; | |
var urls = [ | |
"http://css.studiomohawk.com", | |
"http://inkdesign.jp", | |
"http://t32k.me/mol", | |
"http://havelog.ayumusato.com", | |
"http://aho.mu" |
This file contains hidden or 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
class ArticleActivity extends Activity with TypedActivity { | |
override def onCreate(savedInstanceState: Bundle) { | |
super.onCreate(savedInstanceState) | |
val details: EntryFragment = new EntryFragment() | |
details.setArguments(getIntent().getExtras()) | |
getFragmentManager().beginTransaction().add(android.R.id.content, details).commit() | |
} | |
} |
This file contains hidden or 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
/** | |
* Chikoque | |
* | |
* @author ahomu | |
*/ | |
(function(win, doc, _) { | |
'use strict'; | |
var defaults = { |
This file contains hidden or 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
/** | |
* Reach element when triggered custom events | |
* | |
* @dependency underscore or lodash | |
* @Inspired by https://github.com/alexblack/infinite-scroll | |
* @author ahomu | |
*/ | |
(function(win, doc, _) { | |
'use strict'; |
This file contains hidden or 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
/** | |
* CreatejsModel | |
* | |
* 大雑把にこんな??? | |
* var scene01 = new CreatejsModel({animationName: 'scene01'}); | |
* scene01.apply($('canvas#sceneStage')); | |
*/ | |
define(['backbone', 'anim', 'createjs'], function(Backbone, Anim, createjs) { | |
return Backbone.model.extend({ | |
url: 'resource-manifests.json', |
This file contains hidden or 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
diff --git a/underscore1.4.3.js b/underscore1.4.4.js | |
index 4d83099..6642c09 100644 | |
--- a/underscore1.4.3.js | |
+++ b/underscore1.4.4.js | |
@@ -1,6 +1,6 @@ | |
-// Underscore.js 1.4.3 | |
+// Underscore.js 1.4.4 | |
// http://underscorejs.org | |
-// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. | |
+// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. |
This file contains hidden or 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/node | |
// via http://starwing.net/suddenly_death.html | |
String.prototype.lengthByte = function() | |
{ | |
var str = this; | |
var r = 0; | |
for (var i = 0; i < str.length; i++) { | |
var c = str.charCodeAt(i); |
This file contains hidden or 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
// 自作タスクの中だけの場合 | |
// usage: `expandFiles(patternString)` | |
var expandFiles; | |
if (grunt.file.expandFiles) { | |
expandFiles = grunt.file.expandFiles; | |
} else { | |
expandFiles = function(filesPattern) { | |
return grunt.file.expand({filter: 'isFile'}, filesPattern); |