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 | |
echo ">>> Usage:\n"; | |
function do_it($callback) { | |
return $callback(null, true); | |
} | |
$result = do_it(function($error, $result) { | |
if ($error) { | |
echo "Error!\n"; | |
return false; |
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
Testing http://shopping-all.hu/ | |
At Mon May 6 03:15:15 2013 | |
10 loops | |
Fastest Median Slowest Std Dev | |
--------------------------------------------------------------------------- | |
Server performance: | |
Total application time Unable to be recorded | |
Host latency: |
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
document.addEventListener("DOMContentLoaded", DOMContentLoadedHandler, false); | |
function DOMContentLoadedHandler() { | |
// code here | |
} |
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
function isBreakPoint(bp) { | |
// The breakpoints that you set in your css | |
var bps = [320, 480, 768, 1024]; | |
var w = $(window).width(); | |
var min, max; | |
for (var i = 0, l = bps.length; i < l; i++) { | |
if (bps[i] === bp) { | |
min = bps[i-1] || 0; | |
max = bps[i]; | |
break; |
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 TextUtil = (function() { | |
return { | |
highlight: function (text, words, tag) { | |
// Default tag if no tag is provided | |
tag = tag || 'span'; | |
var i, len = words.length, re; | |
for (i = 0; i < len; i++) { | |
// Global regex to highlight all matches | |
re = new RegExp(words[i], 'g'); |
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
#!/usr/bin/env sh | |
# If DEBUG environment variable is not defined set as false | |
if [[ "x${DEBUG}" == "x" ]] | |
then | |
DEBUG=false | |
fi | |
# Logger function. Display a message if DEBUG is true | |
logMessage() { |
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/core/server/models/post.js b/core/server/models/post.js | |
index b471f51..5e3c680 100644 | |
--- a/core/server/models/post.js | |
+++ b/core/server/models/post.js | |
@@ -44,13 +44,19 @@ Post = ghostBookshelf.Model.extend({ | |
saving: function (newPage, attr, options) { | |
/*jslint unparam:true*/ | |
- var self = this; | |
+ var self = this, |
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
root@yitsushi:~# dd if=/dev/zero of=myfilesystem.1 bs=1M count=300 | |
300+0 records in | |
300+0 records out | |
314572800 bytes (315 MB) copied, 1.67623 s, 188 MB/s | |
root@yitsushi:~# dd if=/dev/zero of=myfilesystem.2 bs=1M count=300 | |
300+0 records in | |
300+0 records out | |
314572800 bytes (315 MB) copied, 1.40912 s, 223 MB/s | |
root@yitsushi:~# mke2fs -j myfilesystem.1 | |
mke2fs 1.42 (29-Nov-2011) |
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
/* ez csak mert jól néz ki */ | |
* { | |
-webkit-transition: -webkit-transform .1s ease-in-out; | |
-moz-transition: -moz-transform .1s ease-in-out; | |
-o-transition: -o-transform .1s ease-in-out; | |
transition: transform .1s ease-in-out; | |
} | |
/* Nem néz ki szépen, de legalább valahogyan :) */ | |
html, body { |
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 App = { | |
core: {}, | |
utils: {}, | |
modules: {} | |
}; |