Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
#!/bin/sh
yum install -y curl ca-certificates
cat << EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
@dasgoll
dasgoll / django_deploy.md
Created April 24, 2019 20:09 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@dasgoll
dasgoll / USING-DIFFMERGE.md
Last active March 3, 2019 13:44 — forked from smoll/USING-DIFFMERGE.md
Using DiffMerge as your git mergetool (for Mac OS X / macOS)

Using DiffMerge as your git mergetool (for Mac OS X / macOS)

brew cask install diffmerge

Step 2: configure it

git config --global diff.tool diffmerge
git config --global difftool.diffmerge.cmd 'diffmerge "$LOCAL" "$REMOTE"'
git config --global merge.tool diffmerge
@dasgoll
dasgoll / ctrr.md
Last active March 3, 2019 20:10 — forked from esmooov/ctrr.md
Carats and Tildes, Resets and Reverts

http://www.paulboxley.com/blog/2011/06/git-caret-and-tilde

Oh cool but what's 'HEAD^'

Carats and tildes are relative commit markers in Git. They both mean "parent" but in a different way.

Most commonly used, they are the same. HEAD^1 (or HEAD^ for short) is the same as HEAD1 (HEAD). Always.

The difference comes when they stack. So HEAD^2 means "The second parent of HEAD". This only means anything if there's been a merge. In a merge, the main branch is parent #1; the merged in branch is parent 2. So, HEAD^2 will be the merged parent, whereas HEAD^1 will be the parent merged into.

@dasgoll
dasgoll / install_source_command_line_tools.sh
Created March 1, 2019 23:26 — forked from guanting112/install_source_command_line_tools.sh
[macOS] SourceTree command line tools install script ( support 10.11, 10.12 )
#!/usr/bin/env bash
function link_stree {
ln -s /Applications/SourceTree.app/Contents/Resources/stree /usr/local/bin/
}
function install {
link_stree
}
@dasgoll
dasgoll / BREW_OLD_FILES.md
Created February 25, 2019 07:13 — forked from johnmccabe/BREW_OLD_FILES.md
Installing/Using old releases with brew

Install Old Releases with Brew

If you need to install an old software release with brew you can do so as follows.

  1. Install the latest version of kubernetes-cli
brew install kubernetes-cli

This will install the latest release (currently 1.12.2) 2. Unlink the installed release so you can install an old version:

@dasgoll
dasgoll / INSTALL.md
Last active March 4, 2019 21:28 — forked from johnmccabe/INSTALL.md
Installing Docker 1.12 on CentOS 6 / CentOS 7
yum -y update
yum -y install yum-utils
yum-config-manager --add-repo https://yum.dockerproject.org/repo/main/centos/7
yum -y update
# yum search --showduplicates docker-engine
yum -y --nogpgcheck install docker-engine-1.12.6-1.el7.centos.x86_64
service docker start
@dasgoll
dasgoll / ansible_local_playbooks.md
Created February 9, 2019 15:17 — forked from alces/ansible_local_playbooks.md
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@dasgoll
dasgoll / Install Openssh from Source
Last active November 24, 2018 00:12 — forked from imagescape/Install Openssh from Source
Install openssh in an alternate location from source
sudo yum -y groupinstall 'Development Tools'
git clone https://github.com/Linuxbrew/brew.git ~/.linuxbrew
#echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >>~/.profile
echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >>~/.profile
echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >>~/.profile
@dasgoll
dasgoll / get_oracle_jdk_linux_x64.sh
Last active January 27, 2019 11:01 — forked from n0ts/get_oracle_jdk_x64.sh
Get latest Oracle JDK package bash shell script
#!/bin/bash
# usage: get_jdk.sh <jdk_version> <ext>
# jdk_version: 8(default) or 9
# ext: rpm or tar.gz
jdk_version=${1:-8}
ext=${2:-rpm}
readonly url="https://www.oracle.com"
readonly jdk_download_url1="$url/technetwork/java/javase/downloads/index.html"