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
package net.phpvietnam.clipsearch.utils; | |
import net.phpvietnam.clipsearch.domain.Clip; | |
import java.util.Map; | |
import java.util.List; | |
import net.sf.json.JSONArray; | |
import net.sf.json.JSONObject; | |
/** |
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
## The Desire is to have http://www.domain.com/index.cfm?menu=web&page=web_main rewrite to http://www.domain.com/web-consulting | |
## The Current rewritten result is http://www.domain.com/web-consulting?menu=web&page=web_main | |
## Looking for suggestions on how to drop the $query_string so that it's not appended to the rewritten url. | |
server { | |
listen 80; | |
server_name .domain.com domain.com; | |
location / { |
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
server { | |
listen 80; | |
server_name sample.mysite.com sample2.mysite.com; | |
access_log /home/webroot/log/access.log; | |
error_log /home/webroot/log/error.log; | |
location ^~ /static { | |
root /home/webroot/mysite; | |
expires max; |
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
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); | |
java.util.Date date = new java.util.Date(); | |
String today = dateFormat.format(date); | |
Calendar calendar = Calendar.getInstance(); | |
// set the calendar time (here, we set it to "today" / "now" date) | |
calendar.setTime(date); | |
calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); // first day of week. | |
String firstDayInWeek = dateFormat.format(calendar.getTime()); |
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 | |
booking_campaign.cv_id, | |
booking_campaign.is_completed, | |
booking_campaign.fullname, | |
booking_campaign.candidate_status, | |
question_point.score_percen, | |
candidate_extra_service.iq_tests, | |
candidate_extra_service.iq_tests_service_cost, | |
candidate_extra_service.reference_checks, | |
candidate_extra_service.reference_checks_service_cost, |
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
/usr/local/nginx/logs/*log { | |
daily | |
missingok | |
rotate 3 | |
compress | |
notifempty | |
postrotate | |
kill -USR1 `cat /usr/local/nginx/nginx.pid` | |
endscript | |
} |
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
/usr/local/apache2/logs/*log { | |
daily | |
rotate 9 | |
missingok | |
notifempty | |
sharedscripts | |
prerotate | |
webalizer -c /usr/local/webalizer/etc/webalizer.conf | |
endscript | |
postrotate |
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
Settings for eth0: | |
Supported ports: [ TP ] | |
Supported link modes: 10baseT/Half 10baseT/Full | |
100baseT/Half 100baseT/Full | |
1000baseT/Half 1000baseT/Full | |
Supports auto-negotiation: Yes | |
Advertised link modes: 10baseT/Half 10baseT/Full | |
100baseT/Half 100baseT/Full | |
1000baseT/Half 1000baseT/Full | |
Advertised auto-negotiation: Yes |
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
#!/usr/bin/env php | |
<?php | |
if( ! function_exists( 'inotify_init' ) ) { | |
die_with_error( 'This script needs the inotify module' ); | |
} | |
// usage: $0 path [path ...] -- command | |
$args = $_SERVER['argv']; |
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
// create list of unused stylesheet rules | |
$(document).ready(function() | |
{ | |
var sel = []; | |
for( var s = 0 ; s < document.styleSheets.length ; s++ ) { | |
var rules = document.styleSheets[s].cssRules || document.styleSheets[s].rules; | |
for( var r = 0 ; r < rules.length ; r++ ) { |