foobar, foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud
networksetup -setdnsservers Wi-Fi 8.8.8.8
networksetup -setdnsservers Wi-Fi 208.67.222.222 208.67.220.220 8.8.8.8
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
package com.vht.sms.content.util; | |
import java.io.*; | |
import java.net.*; | |
import java.security.KeyStore; | |
import java.security.cert.Certificate; | |
import java.security.cert.CertificateFactory; | |
import java.security.cert.X509Certificate; | |
import java.util.ArrayList; | |
import java.util.List; |
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 http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
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
--strict | |
--ignore_errors=1,2,6,110,131,233 | |
--jsdoc | |
--summary | |
--beep | |
--check_html | |
--nomultiprocess | |
--debug_indentation | |
--time |
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
# Install Redmine on CentOS 6.5 | |
# I don't install redmine via command : yum install redmine. | |
# Redmine supports Ruby 1.x so do not install ruby 2.0. | |
Install gem and passenger dependencies | |
yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel libyaml-devel | |
Get Ruby | |
# Create the directory where you will store the Downloads | |
mkdir ~/Downloads # This can be any directory. |
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
# install missing libraries (if any) | |
[root@sm ~]# cd ~ | |
[root@sm ~]# sudo yum update | |
# get and unpack elasticsearch tar file | |
[root@sm ~]# wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.tar.gz -O elasticsearch.tar.gz | |
[root@sm ~]# tar -xvf elasticsearch.tar.gz | |
[root@sm ~]# mv elasticsearch-* elasticsearch | |
[root@sm ~]# sudo mv elasticsearch /usr/local/share |
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
--backup | |
[root@sm ~]# mongodump -d smprocdb -o ./mongodump | |
[root@sm ~]# cd mongodump | |
[root@sm mongodump]# tar -zcf smprocdb.tar.gz smprocdb | |
--restore | |
[root@sm mongodump]# tar -xvf smprocdb.tar.gz ./smprocdb | |
[root@sm mongodump]# mongorestore -d smprocdb --drop ./smprocdb | |
--windows |
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
$ wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-centos6-amd64.rpm | |
$ rpm -ivh wkhtmltox-0.12.1_linux-centos6-amd64.rpm | |
$ which wkhtmltopdf | |
/usr/local/bin/wkhtmltopdf |
NewerOlder