Skip to content

Instantly share code, notes, and snippets.

View ungerik's full-sized avatar
🎯
Focusing

Erik Unger ungerik

🎯
Focusing
View GitHub Profile
@ungerik
ungerik / open-terminal-tabs.sh
Created May 20, 2015 15:03
Open gnome terminal with multiple tabs
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
gnome-terminal --maximize \
--tab --title="PPA" --working-directory=$DIR \
--tab --title="PPA/source" --working-directory=$DIR/source \
--tab --title="PPA/server" --working-directory=$DIR/server \
@ungerik
ungerik / snippets.cson
Created November 10, 2015 15:48
Atom Snippets
'.source.js.jsx':
'React.Component':
'prefix': 'comp'
'body': """
export default class $1 extends React.Component {
static displayName = "$1";
static propTypes = {
\\};
@ungerik
ungerik / all-countries.js
Last active February 6, 2016 15:45
All Country Codes
export const ALL_COUNTRIES = {
AD: "Andorra",
AE: "United Arab Emirates",
AF: "Afghanistan",
AG: "Antigua and Barbuda",
AI: "Anguilla",
AL: "Albania",
AM: "Armenia",
AN: "Netherlands Antilles",
AO: "Angola",
@ungerik
ungerik / .bashrc
Last active August 18, 2016 16:44
Ubuntu .bashrc
# Erik's profile (https://gist.github.com/4110875):
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$GOROOT/bin:/opt/dart/dart-sdk/bin:$PATH
export PATH=/opt/jdk1.8.0/bin:$PATH
@ungerik
ungerik / bash.sh
Created August 18, 2016 18:41
cd $SCRIPT_DIR
#!/bin/bash
SCRIPT_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd $SCRIPT_DIR

Keybase proof

I hereby claim:

  • I am ungerik on github.
  • I am ungerik (https://keybase.io/ungerik) on keybase.
  • I have a public key ASBmJODsLopVmpTfCvsQGbVXOxRycRJHPFzIk5zN0Jkyzgo

To claim this, I am signing this object:

@ungerik
ungerik / forward-other-domains.sh
Created August 11, 2021 08:42
Configure domain forwarding for Bitnami WordPress Stack
sudo nano /opt/bitnami/apache2/conf/bitnami/bitnami.conf
# Redirect other domains permanently to domonda.com
<If "%{HTTP_HOST} != 'example.com'">
Redirect 301 "/" "https://example.com/"
</If>
sudo /opt/bitnami/ctlscript.sh restart apache
@ungerik
ungerik / .bash_profile
Last active September 27, 2022 10:35
.bash_profile for MacOS X
### MacOS
# Don't show "The default interactive shell is now zsh."
export BASH_SILENCE_DEPRECATION_WARNING=1
# Set VSCode as default editor
export EDITOR=code
export VISUAL="$EDITOR"
### Aliases
@ungerik
ungerik / rebase-squash-on-main.sh
Last active August 2, 2023 12:34
Squashed Git Rebase
#!/bin/bash
git checkout -b temp main && git merge --squash $PR_BRANCH
# Resolve merge conflicts, then
git commit -m "my squash commit message"
git checkout $PR_BRANCH
git reset --hard temp && git push -f && git branch -D temp