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
import java.util.HashMap; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import android.os.SystemClock; | |
public class TimeExpiringLruCache<K, V> { | |
private final LinkedHashMap<K, V> map; | |
private final HashMap<K, Long> validityTime; |
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
{ | |
"msg" : "This is gist connection test" | |
} |
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
wget -O - http://curl.haxx.se/ca/cacert.pem | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > "cert" n ".pem"}' |
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
-z: Compress archive using gzip program | |
-c: Create archive | |
-v: Verbose i.e display progress while creating archive | |
-f: Archive File name | |
(this creates archive) | |
tar -zcvf archive_name.tar.gz /home/tom/and/jerry/ | |
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
{ | |
"_default_": { | |
"properties": { | |
"my_hash_field": { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
} | |
} |
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
{ | |
"name": "kibana-server", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "node server.js" | |
}, | |
"dependencies": { | |
"express": "3.4.4" | |
} |
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 | |
/** | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* | |
* Licensed under The MIT License | |
* | |
* Copyright (c) La Pâtisserie, Inc. (http://patisserie.keensoftware.com/) | |
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | |
*/ | |
App::uses('FormHelper', 'View/Helper'); |
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
--- conf-cc.old 2014-07-14 12:06:58.270692758 +0000 | |
+++ conf-cc 2014-07-14 12:07:14.837994394 +0000 | |
@@ -1,3 +1,3 @@ | |
-gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings | |
+gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include /usr/include/errno.h | |
This will be used to compile .c files. |
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/bash | |
func_check_for_root() { | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 | |
fi | |
} | |
func_check_for_root | |
yum install patch -y |
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/bash | |
#check if this script is running in su mode | |
func_check_for_root() { | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 | |
fi | |
} | |
func_check_for_root | |
OlderNewer