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 | |
header("Cache-Control:no-cache,no-store"); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body onload="document.getElementById('test').innerHTML='JS time:'+(new Date()).toString();" onunload=""> | |
<?php | |
echo "PHP time:" . date("Y/m/d g:i:s"); |
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 perl | |
use strict; | |
use warnings; | |
use Cache::Memcached::Fast; | |
use Data::Dumper; | |
my $memd = new Cache::Memcached::Fast({ | |
servers => [ { address => 'localhost:11211', weight => 2.5 } ], |
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
; js2-mode | |
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) | |
; tern | |
(add-hook 'js2-mode-hook (lambda () (tern-mode t))) | |
(eval-after-load 'tern | |
'(progn | |
(require 'tern-auto-complete) | |
(tern-ac-setup))) |
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="test.js"></script> | |
</head> | |
<body> | |
</body> | |
</html> |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 perl | |
use strict; | |
use warnings; | |
use Carp::Assert; | |
use feature ':5.14'; | |
my @list = qw/hoge fuga timpo/; | |
sub osicco { | |
assert @_ ~~ @list; |
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
app.factory('androidLinkWorkaround', [function androidLinkWorkaroundFactory() { | |
var elements = []; | |
var isAndroid = function () { | |
return /(Android);?[\s\/]+([\d.]+)?/.test(navigator.userAgent); | |
}; | |
return { | |
on: function (targetSelectors, exclusionRootSelector) { | |
if ( !isAndroid() ) { |
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
angular | |
.module('angular-legacy-url', []) | |
.factory('AngularLegacyUrl', ['$window', function AngularLegacyUrlFactory($window) { | |
var getQueries = function (search) { | |
return search | |
.replace(/(^\?)/, '') | |
.split('&') | |
.reduce(function (sum, item) { | |
if ( item === '' ) { | |
return sum; |
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
{ | |
"tagname-lowercase": false, | |
"tag-pair": true, | |
"attr-value-double-quotes": true, | |
"attr-value-not-empty": true, | |
"attr-no-duplication": true, | |
"id-unique": true, | |
"space-tab-mixed-disabled": "space4" | |
} |