Skip to content

Instantly share code, notes, and snippets.

View mokxter's full-sized avatar
:shipit:
Ship

Ian Cristopher Buena mokxter

:shipit:
Ship
View GitHub Profile
@mokxter
mokxter / android-setup
Created November 21, 2017 11:42
Bashrc code for android setup
Add this to your bashrc file.
export PATH=${PATH}:/home/user/Android/Sdk/tools
export ANDROID_HOME=/home/user/Android/Sdk/
export PATH=${PATH}:/home/user/Android/Sdk/plathform-tools
export PATH=$HOME/.node/bin:$PATH
@mokxter
mokxter / yarn-setup
Created November 21, 2017 11:41
Set prefix and add to bashrc
Set prefix first
yarn config set prefix ~/.yarn
Then add this to your bashrc
export PATH=$HOME/.node/bin:$PATH
export PATH=$HOME/.yarn/bin:$PATH
Then reload your terminal or run
source ~/.bashrc
@mokxter
mokxter / change_posgres_password
Created November 17, 2017 12:05
Change the password of the default posgres user
reference: http://suite.boundlessgeo.com/docs/latest/dataadmin/pgGettingStarted/firstconnect.html
To set the default password:
Run the psql command from the postgres user account:
sudo -u postgres psql postgres
Set the password:
@mokxter
mokxter / text_example.ex
Created October 16, 2017 09:42 — forked from chiragtoor/text_example.ex
Example Elixir code for sending a text message through ExTwilio
def send_text_message(phone_number, message) do
ExTwilio.Api.create(ExTwilio.Message,
[to: phone_number,
from: Application.get_env(:ex_twilio, :send_number),
body: message])
end
@mokxter
mokxter / kubectl-delete-pod.txt
Last active August 2, 2017 15:23
How to delete a pod using kubectl
kubectl delete pod --grace-period=0 --force --namespace='auditionmagic-v2' 'auditionmagic-v2-web-2499205047-p54l6'
@mokxter
mokxter / fetch_pull_request.txt
Created June 1, 2017 02:01
Fetch a pull request
git fetch origin pull/1119/head:fix/compulsory-button-text <--- just a sample
@mokxter
mokxter / pgadmin4.txt
Created May 26, 2017 01:56
Installation of pgadmin4 in ubuntu
Install dependencies, create a virtual environment, download, install & configure
sudo apt-get install virtualenv python-pip libpq-dev python-dev
cd
virtualenv pgadmin4
cd pgadmin4
source bin/activate
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.4/pip/pgadmin4-1.4-py2.py3-none-any.whl
@mokxter
mokxter / enospc.md
Created May 11, 2017 04:53
Fix for ENOSPC - Memory problem

Run this magic line

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

For Arch Linux add this line to /etc/sysctl.d/99-sysctl.conf:

fs.inotify.max_user_watches=524288

Then execute:

@mokxter
mokxter / firefox_fix.md
Created April 27, 2017 12:46
Make firefox a bit faster in ubuntu / linux

go to about:config

search layers.acceleration.force-enabled

set value to true

@mokxter
mokxter / continue_download.md
Last active March 18, 2017 07:09
Continue download in wget, curl or Aria

#CURL

curl -L -C - -o "myfile.zip" "http://example.com/file.zip"

#ARIA

aria2c -c -m 0 -o "myfile.zip" "http://example.com/file.zip"

#WGET

wget -d -c --tries=0 --read-timeout=30 -O "myfile.zip" "http://example.com/file.zip"