This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'open3' | |
aliases = | |
%{git_current_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
gpush() { | |
git push origin $(git_current_branch) |
This file contains hidden or 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
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
apt-get update | |
apt-get install -y google-chrome-stable | |
// google-chrome --headless --no-sandbox --disable-gpu |
This file contains hidden or 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
{ | |
"Set component state": { | |
"prefix": "%setstate", | |
"description": "Call set state function", | |
"body": [ | |
"this.setState(state => Object.assign({}, state, {$1}));" | |
] | |
}, | |
"Modify state": { | |
"prefix": "%modifystate", |
This file contains hidden or 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 a model with following columns | |
# possible field types: string, integer, references, float, boolean | |
# to create a belongs to association: ($OWNER)_id:references:$OWNER_PLURAL | |
mix phoenix.gen.model $MODEL_NAME $PLURAL_MODAL_NAME $FIELD_NAME:FIELD_TYPE | |
# mix phoenix.gen.model Note notes content:string user_id:references:users |
This file contains hidden or 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
# list all containers dead or alive | |
docker ps -a | |
# stop and remove all containers | |
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
# create a container | |
export ENTRY_POINT=bash | |
docker run -d -it --name $CONTAINER_NAME -v $HOST_MOUNT_POINT:$GUEST_MOUNT_POINT -p $HOST_PORT:$GUEST_PORT $IMAGE $ENTRY_POINT |
This file contains hidden or 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
{ | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"env": { | |
"browser": true, |
This file contains hidden or 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
"HTML Template": { | |
"prefix": "thtml", | |
"body": [ | |
"<!DOCTYPE HTML>", | |
"<html>", | |
"<head>", | |
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />", | |
" <title>$1</title>", | |
"</head>", | |
"<body>", |
This file contains hidden or 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
FROM ubuntu:16.04 | |
MAINTAINER Alican Erdogan <[email protected]> | |
RUN apt-get update && \ | |
apt-get install -y language-pack-en-base && \ | |
locale-gen "en_US.UTF-8" | |
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' | |
RUN apt-get install -y sudo wget git nano nginx postgresql postgresql-contrib |
This file contains hidden or 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
# Preview: | |
# ae > /mnt/c/Users/Alican/Repos/aTorrent (master) | |
# $ | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1="\[$(tput bold)\]\[\033[38;5;230m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput bold)\]>\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;14m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\] \[\033[38;5;11m\]\$(parse_git_branch)\n\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;230m\]\\$\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]" |