Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added sample script.

  • Loading branch information...
commit 524d8c82aeb94529c0abf800186bff96f31af0da 1 parent b47c005
@okamuuu authored
View
6 script/get_yesterday.pl
@@ -0,0 +1,6 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use DateTime;
+
+warn DateTime->now()->subtract( seconds => 1 )->ymd;
View
34 script/node-bench.js
@@ -0,0 +1,34 @@
+// https://github.com/isaacs/node-bench
+
+var obj = {
+ hoge: 1,
+ fuga: 2,
+ piyo: 3,
+ moga: {
+ hoge: 1,
+ fuga: 2,
+ piyo: 3
+ }
+};
+
+function copy (obj) {
+ var tmp = {};
+ for (var k in obj) {
+        if (obj[k].constructor === Object || obj[k].constructor === Array) {
+            tmp[k] = copy(obj[k]);
+        } else {
+            tmp[k] = obj[k];
+        }
+    }
+    return tmp;
+}
+
+exports.compare = {
+ "json.parse": function() {
+ var copied = JSON.parse(JSON.stringify(obj));
+ },
+ "copy function": function() {
+ var copied = copy(obj);
+ }
+};
+require("bench").runMain()
View
6 script/svn_log_yesterday.sh
@@ -0,0 +1,6 @@
+SUBTRACT=1
+if (($#>0)); then
+ SUBTRACT=$1
+fi
+DAY=`perl -MDateTime -le "print+(DateTime->now()->subtract(days=>$SUBTRACT)->ymd())"`
+svn -r {$DAY}:HEAD log
Please sign in to comment.
Something went wrong with that request. Please try again.