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
objToFormData = (obj, formData, prefix) -> | |
formData ?= new FormData | |
formKey = null | |
angular.forEach obj, (val, key) -> | |
if prefix? | |
formKey = "#{prefix}[#{key}]" | |
else | |
formKey = key |
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": true, | |
"attr-lowercase": true, | |
"attr-value-double-quotes": true, | |
"attr-value-not-empty": true, | |
"attr-no-duplication": true, | |
"doctype-first": false, | |
"tag-pair": true, | |
"tag-self-close": false, | |
"spec-char-escape": true, |
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/bash | |
#delete bash logs & disable logging on linux | |
export HISTFILE=/dev/null; | |
export HISTSIZE=0; | |
rm ~/.bash_history -rf; | |
history -c; |
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
/** | |
* @param string $cmd Command to execute | |
* @return string Result | |
*/ | |
public function _exec($cmd) | |
{ | |
$res = ''; | |
if (!empty($cmd)) { | |
if (@function_exists('exec')) { | |
exec($cmd, $res); |
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
$regexpLastThirty = '#' . '(' . | |
/* | |
* regExp builder for this month | |
* d-m-Y m-d-Y Y-d-m Y-m-d | |
* d-m-y m-d-y y-d-m y-m-d | |
*/ | |
implode('|', array_map(function ($v) { | |
return | |
'(' . str_pad($v, 2, 0, STR_PAD_LEFT) . '[^:]?' . str_pad(date('m'), 2, 0, STR_PAD_LEFT) . '[^:]?' . date('Y') . ')' | |
. '|' . '(' . str_pad(date('m'), 2, 0, STR_PAD_LEFT) . '[^:]?' . str_pad($v, 2, 0, STR_PAD_LEFT) . '[^:]?' . date('Y') . ')' |
NewerOlder