This file contains 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 | |
/** | |
* Template Name: worker | |
*/ | |
$args = array( | |
'posts_per_page'=> '-1', | |
'post_type'=> 'post', | |
'post_status' => array('publish'), | |
'order' => 'ASC', |
This file contains 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
global | |
log 127.0.0.1 local0 notice | |
chroot /var/lib/haproxy | |
user haproxy | |
group haproxy | |
# daemon | |
defaults | |
log global | |
# mode http |
This file contains 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
SetEnvIf Request_URI "\.gif$|\.jpg$|\.js$|\.css$|\.ico$|\.png$|\.ttf$|\.woff$|\.eot$|\.svg$|\.jpeg$|\.txt$" is_static | |
CustomLog /var/yourlogs/apache.access_log combined env=!is_static |
This file contains 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
// paste | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// wait and paste | |
jQuery.noConflict(); | |
// each paste will print the list on console, copy and paste + remove unnecessary lines | |
var a = jQuery('#browse_content li a'); |
This file contains 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
mkdir $(seq -f '%02.0f' 1 12) | |
creates folders: | |
01 02 03 04 05 06 07 08 09 10 11 12 |
This file contains 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
SELECT | |
CONCAT( | |
'ALTER TABLE ', | |
TABLE_SCHEMA, | |
'.', | |
TABLE_NAME, | |
' ENGINE = MyISAM;' | |
) | |
FROM | |
information_schema. TABLES |
This file contains 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
# find all files forward this directory and set 644 | |
sudo find . -type f -exec chmod 644 {} + | |
# find all directories forward and set 755 | |
sudo find . -type d -exec chmod 755 {} + |
This file contains 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
# PROBLEM **************************************************************************** | |
error: Your local changes to the following files would be overwritten by merge: | |
Library/Formula/node.rb | |
Please, commit your changes or stash them before you can merge. | |
Aborting | |
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master | |
###################################################################################### | |
# FIX BELOW ------------------------- | |
cd $(brew --repository) |
This file contains 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
# via http://binarynature.blogspot.com/2013/03/measure-internet-connection-speed-from-linux-command-line.html | |
wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py && chmod +x speedtest-cli && ./speedtest-cli |
This file contains 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 findDateFromCalendarByName( find , timer ){ | |
if ( find == '' ) { return; } | |
var ss = SpreadsheetApp.getActiveSpreadsheet(), output = []; | |
// var searchData = ss.getSheetByName('Calendar').getDataRange().getValues(); | |
var searchData = ss.getSheetByName('Calendar').getRange("A1:P10").getValues(); | |
for(var j=0, jLen=searchData.length; j<jLen; j++) { |
OlderNewer