curl --remote-name http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -xzvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local/autoconf-2.69
make
make install
cd /usr/local/
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
# On Git host machine | |
sudo add-apt-repository ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install git | |
sudo useradd git -m -s /usr/bin/git-shell |
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
apt-get update | |
apt-get upgrade | |
apt-get install perl build-essential curl | |
curl -L http://cpanmin.us | perl - --sudo App::cpanminus |
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
# List all indices | |
curl '127.0.0.1:9200/_cat/indices?v' | |
# Delete index | |
curl -XDELETE 127.0.0.1:9200/<index name>/ |
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
# Current best practice is to install Node.js/NPM as root using sudo | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs | |
node --version |
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
sudo mkdir -p /var/www/ | |
cd /var/www/ | |
sudo wget https://ghost.org/zip/ghost-latest.zip | |
sudo unzip -d ghost ghost-latest.zip | |
cd ghost/ | |
sudo npm install --production | |
sudo vi config.example.js | |
# In 'Production' section, change: |
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 if (!defined('BASEPATH')) { exit; } | |
class MY_Encrypt extends CI_Encrypt { | |
public function __construct() { | |
parent::__construct(); | |
} | |
/** | |
* Encrypt a given string using SHA512 encryption. |
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 if (!defined('BASEPATH')) { exit; } | |
if (!function_exists('generate_uuid')) { | |
/** | |
* Generate a universally unique ID that can be used for sharding. | |
* | |
* @param integer $shard_id The ID to shard by. | |
* @param integer $seq Incrementing sequence for the database table. | |
* @return string Universally unique ID. | |
*/ |
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
public int compareTo(Person other) { | |
int i = firstName.compareTo(other.firstName); | |
if (i == 0) | |
{ | |
i = lastName.compareTo(other.lastName); | |
} | |
return i; | |
} |
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 uk.co.validus.billingserver.util; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.TreeMap; | |
import java.util.concurrent.ConcurrentHashMap; |
OlderNewer