Skip to content

Instantly share code, notes, and snippets.

View pcdinh's full-sized avatar

Pham Cong Dinh pcdinh

View GitHub Profile
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;
/**
## 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 / {
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;
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());
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,
/usr/local/nginx/logs/*log {
daily
missingok
rotate 3
compress
notifempty
postrotate
kill -USR1 `cat /usr/local/nginx/nginx.pid`
endscript
}
/usr/local/apache2/logs/*log {
daily
rotate 9
missingok
notifempty
sharedscripts
prerotate
webalizer -c /usr/local/webalizer/etc/webalizer.conf
endscript
postrotate
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
#!/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'];
// 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++ ) {