mkdir -p ~/apps/pgadmin4
cd ~/apps/pgadmin4
virtualenv venv -p /usr/bin/python2.7
source ./venv/bin/activate
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.5/pip/pgadmin4-1.5-py2.py3-none-any.whl
pip install six
pip install pgadmin4-1.5-py2.py3-none-any.whl
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
class IAmDisposable : IDisposable | |
{ | |
private int _isDisposed; | |
private SomeDisposableThing _disposable1; | |
private SomeDisposableBar _disposable2; | |
private SomeDisposableBaz _disposable3; | |
// Only if you **need** it. You don't though, use SafeHandle. | |
//~IAmDisposable() | |
//{ |
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 | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) | |
# Some images might still exist | |
# check with: docker images | |
# delete with: docker rmi --force 0482a5fd046c |
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
# Search directories with name node_modules | |
find . -name 'node_modules' -type d | |
# Displays parent folders and child folders | |
./laravel/passport/node_modules (parent) | |
./laravel/passport/node_modules/yargs-parser/node_modules (child) | |
./laravel/passport/node_modules/gauge/node_modules (child) | |
./hapi/hapi-auth-jwt2/node_modules (parent) | |
./hapi/hapi-auth-jwt2/node_modules/acorn-jsx/node_modules (child) | |
./hapi/hapi-auth-jwt2/node_modules/optimist/node_modules (child) |
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 main | |
import "fmt" | |
// State provides the minimal state machine | |
type State func() (next State) | |
func tick() State { | |
fmt.Println("tick...") | |
return tock |
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
// License: MIT | |
package main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"math/big" | |
) | |
// GenerateRandomASCIIString returns a securely generated random ASCII string. |
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
<? | |
// <readme> | |
/* | |
This is a lite version of Olark's and Intercom's functionality (without the chat part). | |
It lets you get feedback from users on your site to your email. | |
And you won't have to rely on another company anymore! | |
#killyourdependencies |
- update os and install vm tools, git and fish
- setup fish with oh-my-fish and theme bobthefish (bobthefish is a theme similar to agnoster)
- install nodejs 8.x and yarn
- fix npm permission issues
- install go
- install vs code
Nice snippet from Stathat:
func timeTrack(start time.Time, name string) {
elapsed := time.Since(start)
log.Printf("%s took %s\n", name, elapsed)
}
func tracked() {
Most notes have been taken from the book PostgreSQL: Up and Running which I highly recommend. Buy it, loads of little gems inside.
The minimum SQL command to create a database is:
OlderNewer