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
#!/bin/sh | |
readonly empty_dir=$(mktemp -d) | |
readonly target_dir="$1" | |
rm -rf $empty_dir | |
mkdir $empty_dir | |
rsync --recursive --delete $empty_dir/ "$target_dir"/ | |
# --delete: delete extraneous files from dest dirs (differential clean-up during sync) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Page Hover Preview</title> | |
<style id="jsbin-css"> | |
.box{ | |
display: none; | |
width: 100%; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Page Hover Preview</title> | |
<style id="jsbin-css"> | |
.box{ | |
display: none; | |
width: 100%; |
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
#It might be the case you have redefined the shortcuts. But this is what the default is. | |
Ctrl+A: move to the start of the current line | |
Ctrl+E: move to the end of the line | |
Alt+F: move to the end of the next word | |
Alt+B: move to the start of the current or previous word | |
Ctrl+T: swap the two last characters, e.g.: sl<C-t> → ls | |
Alt+T: swap the last two words, e.g.: foo bar<M-t> → bar foo | |
Ctrl+U: cut the text of the current command before the cursor. | |
Ctrl+W: cut only the word before the cursor. |
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 a.com b.com c.com; | |
location ~* ^/comment/(.*) { | |
proxy_set_header HOST shared.com; | |
# $1 - stores capture from the location on top | |
# $is_args will return ? if there are query params | |
# $args stores query params |
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 443; | |
server_name example.com; | |
error_log /var/log/nginx/example_com_error.log warn; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/your.crt; #certificate chains | |
ssl_certificate_key /etc/nginx/ssl/your.key; #private key | |
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
# Get maven and git installed/ built from source | |
cd ~/Documents | |
git clone https://github.com/apache/mahout.git | |
cd mahout | |
mvn clean package | |
# For specific jars: ex. mahout-math jar | |
# cd math | |
# mvn clean package | |
# ls target mahout-math-0.12-SNAPSHOT.jar |
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
#Get maven | |
sudo apt-get install maven | |
#Check version | |
mvn -v | |
#Get source | |
git clone https://github.com/apache/maven.git ~/Documents | |
cd ~/Documents/maven | |
# create new maven snapshot | |
mvn install | |
# At last it gives the maven snapshot location, ex. ~/.m2/repository/org/apache/maven/apache-maven |
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
/* | |
Attaching the time stamp so that based on the returned value , we can find out when it is generated | |
*/ | |
function _Random(){ | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx-te'.replace(/[xye]/g, function (c) { | |
var r = Math.random() * 16 | 0; | |
if(c == 'e'){ var t = (new Date).getTime(); v = t} | |
else{var v = c == 'x' ? r : (r & 3 | 8);} | |
return v.toString(16); | |
}); |