Skip to content

Instantly share code, notes, and snippets.

Adan Rehtla djravine

Block or report user

Report or block djravine

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@djravine
djravine / setup_xrdp_ubuntu_18.04.sh
Last active Mar 9, 2020
Setup xRDP on Ubuntu 18.04
View setup_xrdp_ubuntu_18.04.sh
#!/bin/bash
set -xuo pipefail
# GIST: https://gist.github.com/djravine/2479d7f14acb3e4ef155179f155010b2
# USAGE: ssh -t -p 2222 adan@localhost 'curl -sL https://gist.github.com/djravine/2479d7f14acb3e4ef155179f155010b2/raw | sudo bash -s -- USERNAME PASSWORD'
# CHECK USERNAME/PASSWORD
USERNAME=$1
PASSWORD=$2
@djravine
djravine / install_vm.sh
Last active Mar 6, 2020
Create a new VirtualBox VM for Development
View install_vm.sh
#!/bin/bash
set -o pipefail
# GIST: https://gist.github.com/djravine/e4e225d96269cb0b887ecf4e2281bb74
# USAGE: curl -sL https://gist.github.com/djravine/e4e225d96269cb0b887ecf4e2281bb74/raw | bash -s -- VMNAME USERNAME PASSWORD COUNTRY TIMEZONE LANGUAGE /PATH/TO/ISO "POST_INSTALL_COMMAND"
VMNAME="${1}"
OSUSERNAME="${2}"
OSPASSWORD="${3}"
OSCOUNTRY="${4}"
@djravine
djravine / install_virtualbox6.0_ubuntu_18.04.sh
Last active Mar 6, 2020
Install Virtualbox6.0 on Ubuntu18.04
View install_virtualbox6.0_ubuntu_18.04.sh
#!/bin/bash
set -o pipefail
# GIST: https://gist.github.com/djravine/aeaaaf28e7ce9b51188c1403f1db6560
# USAGE: curl -sL https://gist.github.com/djravine/aeaaaf28e7ce9b51188c1403f1db6560/raw | sudo bash -s --
apt-get remove -y --purge virtualbox*
apt-get autoremove -y
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
@djravine
djravine / setup_virtualbox_ubuntu_18.04.sh
Last active Mar 6, 2020
Provision script to setup Ubuntu18.04 on VirtualBox VM
View setup_virtualbox_ubuntu_18.04.sh
#!/bin/bash
set -xuo pipefail
# GIST: https://gist.github.com/djravine/19f4d820bce3d716108b3f77d7132275
# USAGE: ssh -t -p 2222 adan@localhost 'curl -sL https://gist.github.com/djravine/19f4d820bce3d716108b3f77d7132275/raw | sudo bash -s -- adan'
# CHECK USERNAME
USERNAME=$1
# SET LOCALE
@djravine
djravine / setup_laravel_ubuntu_18.04.sh
Last active Mar 9, 2020
Provision script to setup laravel on Ubuntu with mock members.sql
View setup_laravel_ubuntu_18.04.sh
#!/bin/bash
set -xuo pipefail
# GIST: https://gist.github.com/djravine/adb8821a49621fb6c8306c4882767018
# USAGE: ssh -i ~/.ssh/${KEYNAME} -t -p 22 ubuntu@${EC2_IP} 'curl -sL https://gist.githubusercontent.com/djravine/adb8821a49621fb6c8306c4882767018/raw | sudo bash -s -- ${GIT_REPO_URL}'
# LARAVEL BOOTSTRAP
laravel_bootstrap () {
# INSTALL MYSQL-SERVER
@djravine
djravine / gist:cbece97e05f09c749b317743a2d6b0c4
Created Jan 14, 2020 — forked from barezina/backup.py
BackupRipper for iOS - Unpack an iOS iPhone Backup into its native files.
View gist:cbece97e05f09c749b317743a2d6b0c4
import sqlite3
import os
print('BackupRipper for iOS - v1.0')
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
@djravine
djravine / git-reset.sh
Created Jul 2, 2019
GIT RESET - Squash all commits into 1
View git-reset.sh
git reset $(git commit-tree HEAD^{tree} -m "A new start")
@djravine
djravine / read-input-with-visible-countdown.sh
Last active May 15, 2019
BASH - Read input with visible countdown
View read-input-with-visible-countdown.sh
#!/bin/bash
# set -euo pipefail
READTIMEOUT=5
function read_yn {
MESSAGE=$1
TIMEOUTREPLY=$2
NORMALREPLY="Y"
if [ -z "${TIMEOUTREPLY}" ]; then
@djravine
djravine / git-update-index-script.sh
Last active Jul 22, 2019
Automatically apply “git update-index --chmod=+x” to executable files
View git-update-index-script.sh
find . -name '*.sh' | xargs git update-index --chmod=+x
@djravine
djravine / algolite-test.js
Created Mar 26, 2019
Algolite Test Script
View algolite-test.js
# npm i algoliasearch
var algoliasearch = require('algoliasearch');
var connectJSON = {
timeout: 4000,
protocol: 'http:',
hosts: {
read: ['localhost:9201'],
write: ['localhost:9201']
You can’t perform that action at this time.