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
[vagrant@localhost path2dx]$ php testuniqid.php | |
ECL00002-7f01-547c7274-5002 | |
ECL00002-0801-547c7274-5002 | |
ECL00002-0c65-547c7274-5002 | |
ECL00002-f4fb-547c7274-5002 | |
ECL00002-fafa-547c7274-5002 | |
[vagrant@localhost path2dx]$ |
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
NameVirtualHost * | |
<VirtualHost *> | |
ServerName owncloud.mydomain.com | |
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> |
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 | |
class SomeUniqueId { | |
protected $strId = ''; | |
public function __construct($ip, $timestamp = null) | |
{ | |
$ids = array( | |
$this->generateLocationId(), |
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
set history=100 | |
set undolevels=50 | |
syntax enable | |
set backup | |
set backupdir=$HOME/.vim/backup | |
set directory=$HOME/.vim/temp | |
set nonumber | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=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
# .bash_profile | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# User specific environment and startup programs | |
PATH=$PATH:$HOME/.local/bin:$HOME/bin |
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
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Uncomment the following line if you don't like systemctl's auto-paging feature: | |
# export SYSTEMD_PAGER= |
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 | |
# | |
# chkconfig: - 80 15 | |
# description: mongodb | |
start() { | |
mongod --replSet myawesomedb --dbpath=/home/lysender/.local/mongo/db --fork --logpath /home/lysender/.local/mongo/db.log --logappend --nojournal --smallfiles | |
#mongod --replSet myawesomedb --dbpath=/home/lysender/.local/mongo/db2 --fork --logpath /home/lysender/.local/mongo/db2.log --logappend --port 28017 --nojournal --smallfiles | |
#mongod --replSet myawesomedb --dbpath=/home/lysender/.local/mongo/db3 --fork --logpath /home/lysender/.local/mongo/db3.log --logappend --port 29017 --nojournal --smallfiles | |
echo "Starting MongoDB"; |
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
# login to mongo and paste below config | |
> rsconf={"_id" : "myawesomedb","version" : 1,"members" : [{"_id" : 1, "host" : "localhost:27017"}]} | |
> rs.initiate(rsconf); | |
> rs.status(); |
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
# Build an image based on docker file (--rm to delete intermediate containers) | |
docker build --rm -t mmage/app . | |
# Run the container (create a name for it as well) | |
# run as daemon, map 8080 to containers 80 port | |
docker run --name=mmage_app -d -p 8080:80 mmage/app | |
# Stop a named container | |
docker stop mmage_app |
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 mmage.lysender.com; | |
location / { | |
proxy_pass http://127.0.0.1:8080/; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
OlderNewer