$ sudo apt-get install -y postgresql-9.4 postgresql-contrib-9.4 libpq-dev
$ sudo su - postgres
postgres@user:~$ createuser user
postgres@user:~$ psql
postgres=# ALTER ROLE user WITH SUPERUSER CREATEDB REPLICATION LOGIN;
postgres=# \password user
postgres=# CREATE SCHEMA user;
postgres=# \q
postgres@user:~$ exit
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 control: | |
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) | |
*/ | |
// Installed Material Theme | |
// Font: Monaco | |
{ |
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
#!/bin/bash | |
echo 'Checking for ruby version in $RBENV_VERSION env var...' | |
if [ -n "$RBENV_VERSION" ]; then | |
VERSION=$RBENV_VERSION | |
fi | |
if [ -z ${VERSION+x} ]; then | |
echo 'Checking for ruby version in .ruby-version file...' | |
if [ -f ./.ruby-version ]; then |
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 rects = []; | |
var SQPI = (PI/64); | |
var xq = 0.01; | |
function r(x,y,w,h){ | |
var self = this; | |
this.x = x; | |
this.y = y; | |
this.w = w; | |
this.h = h; |
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
freebsd-update fetch install | |
pkg install -y nginx | |
rm /usr/local/etc/nginx/nginx.conf | |
wget https://gist.githubusercontent.com/jeanlescure/010660a00ea17907873cc4838f047efe/raw/22abe2f2dc670d47f5ba66518f0069e0464702dd/vcloud-nginx.conf -O /usr/local/etc/nginx/nginx.conf --no-check-certificate | |
mkdir -p /var/log/nginx | |
touch /var/log/nginx/access.log | |
touch /var/log/nginx/error.log | |
mkdir -p /usr/local/etc/nginx/sites-enabled/ | |
mkdir -p /usr/local/etc/nginx/sites-available/ | |
nginx -t |
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
# Misc operations I use in OSX for PostgreSQL management | |
# Install brew and postgres | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install postgresql | |
postgres -V | |
# If password lost just change 'md5' to 'trust' for all users in following file | |
sudo vim /Library/PostgreSQL/10.x/data/pg_hba.conf |
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
<link href="https://fonts.googleapis.com/css?family=Erica+One" rel="stylesheet"> | |
<style> | |
body { | |
background: white; | |
font-family: 'Erica One', cursive; | |
} | |
</style> | |
<div style="text-align:center;font-size:30px;"> | |
<h1 style="font-weight:normal;">COMING SOON</h1> | |
</div> |
Source: https://stackoverflow.com/a/4982271/2731075
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "incorrect@email" ]; then
GIT_AUTHOR_EMAIL=correct@email;
GIT_AUTHOR_NAME="Correct Name";
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all
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
apt-get update | |
apt-get install -y software-properties-common | |
add-apt-repository -y ppa:certbot/certbot | |
apt-get update | |
apt-get install -y gpp python zip unzip mariadb-server nginx python-certbot-nginx | |
systemctl status mariadb | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash | |
source ~/.bashrc | |
nvm install 10.13 | |
npm install -g yarn |