$ crontab -l > crontab.back$(date '+%y%m%d_%H%M%S')
$ crontab .crontab.back
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
.room { | |
width: 200px; | |
float: left; | |
margin-right: 145px; | |
} | |
.room-msg { | |
top: -20px; | |
left: 190px; | |
height: 100% !important; |
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
{ | |
"require-dev": { | |
"phpunit/phpunit": "4.6.*" | |
}, | |
"autoload": { | |
"psr-4": { | |
"Namespace\\": "" | |
} | |
} | |
} |
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 | |
// app/routes.php | |
Route::get('/', function() | |
{ | |
$artist = new Artist; | |
$artist->name = 'Eve 6'; | |
$artist->save(); |
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 | |
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors', 1); | |
function fputcsv2($fp, $fields, $delimiter = ',', $enclosure = '"', $mysql_null = false) { | |
$delimiter_esc = preg_quote($delimiter, '/'); | |
$enclosure_esc = preg_quote($enclosure, '/'); | |
$output = array(); |
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 jq = document.createElement('script'); | |
jq.src = 'https://code.jquery.com/jquery-2.1.3.min.js'; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); // Option |
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
<source> | |
type tail | |
format apache | |
path /var/log/httpd/access_log | |
pos_file /var/log/td-agent/access_log.pos | |
tag geo.apache.log | |
</source> | |
<match geo.apache.log> | |
type geoip |
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
<source> | |
type tail | |
format /^\[(?<time>[^\]]*)\] (?<message>.*)$/ | |
path /var/log/php_errors.log | |
pos_file /var/log/td-agent/php_errors_log.pos | |
tag php.errors_log | |
</source> | |
<match php.errors_log> | |
type elasticsearch |
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
<source> | |
type tail | |
format apache | |
path /var/log/httpd/access_log | |
pos_file /var/log/td-agent/access_log.pos | |
tag apache.log | |
</source> | |
<match apache.log> | |
type elasticsearch |
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 | |
$a = array(0,1,2,3,4,5,6,7,8,9); | |
$b = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'); | |
$c = array('_'); | |
$x = array_merge($a,$b,$c); | |
function userId($arr, $length = 4){ | |
$max = count($arr); | |
if ($max < $length) { |