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
Had to add line to pg_hba.conf: | |
You need to open file called /var/lib/pgsql/data/pg_hba.conf. Login as postgres user using su command: | |
$ su - postgres | |
$ vi /var/lib/pgsql/data/pg_hba.conf | |
Now append following line. Let us say you would like to give access to 192.168.1.0/24 network: | |
host all all 192.168.1.0 255.255.255.0 trust |
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
CREATE TABLE users ( | |
id SERIAL PRIMARY KEY, | |
name VARCHAR(200) NOT NULL | |
); | |
insert into users (name) values ('bob'), ('tom'), ('jane'), ('mary'); | |
CREATE TABLE sales ( | |
id SERIAL PRIMARY KEY, | |
user_id int references users(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
#Received this error recently | |
psql | |
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib | |
Referenced from: /usr/local/Cellar/postgresql@10/10.6_1/lib/libpq.5.10.dylib | |
Reason: image not found | |
Abort trap: 6 | |
# Based on this post | |
#https://stackoverflow.com/questions/59006602/dyld-library-not-loaded-usr-local-opt-openssl-lib-libssl-1-0-0-dylib | |
# I hade to change homebrew's versino of openssl |
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
docker-machine create default | |
# this I think not needed because it was started on create?: | |
# docker-machine start default | |
eval $(docker-machine env default) | |
# create/start docker containers based on docker-compose config files | |
docker-compose up |
This file has been truncated, but you can view the full file.
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
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) | |
/******/ return installedModules[moduleId].exports; |
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 apt-get install rng-tools gpgv |
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
{ | |
init: function(elevators, floors) { | |
var capacity = 4; | |
var step = Math.floor(floors.length / elevators.length) | |
var getClosestElevator = function(elevators, floor){ | |
return elevators.reduce(function(closest, current){ | |
var distance1 = Math.abs(closest.currentFloor()-floor.floorNum()) | |
var distance2 = Math.abs(current.currentFloor()-floor.floorNum()) | |
if(distance1 > distance2){ | |
return current |
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
# 'ag' command - search for text | |
sudo apt-get install silversearcher-ag |
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 | |
# needed for compiling emacs | |
sudo apt-get install -y libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff4-dev libncurses5-dev qjackctl qsynth | |
# misc | |
sudo apt-get install -y aptitude rlwrap grc | |
# work | |
sudo apt-get install -y mysql-server git git-gui openjdk-7-jdk openjdk-6-jdk curl |
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 apt-get install libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff4-dev libncurses5-dev |