sudo usermod -aG docker $USER
Adding your user to the docker group. OBS! Follow up with a login-logout process of the session.
| #!/bin/bash | |
| is_lt() { awk "BEGIN {exit !($1 < $2)}"; } | |
| # System info | |
| total_cpus=$(nproc) | |
| uptime=$(awk '{print $1}' /proc/uptime) | |
| hertz=$(getconf CLK_TCK) | |
| total_mem_kb=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) | |
| docker_ps=$(docker ps --no-trunc --format '{{.ID}} {{.Names}}') |
remove last commit from git and github
git push -f origin HEAD^:master
| #!/bin/bash | |
| # note that all commits will have the same commit message | |
| if [ $# -eq 1 ]; then | |
| MSG=$1 | |
| else | |
| read -p "commit message: " MSG | |
| fi | |
| for d in */ ; do |
| #!/bin/bash | |
| docker run \ | |
| -it \ | |
| --rm \ | |
| --volume /etc/localtime:/etc/localtime:ro \ | |
| --volume `pwd`/.npmrc:/root/.npmrc \ # notice the login credentials that needs to be mounted | |
| --volume `pwd`:/app \ | |
| --workdir /app \ | |
| node /bin/bash -c " |
| (seed) => | |
| { | |
| const n = Math.sin(seed); | |
| return n - Math.floor(n); | |
| }; |
| # settig default permissions, r/rw to your user and your default group | |
| umask 0002 | |
| # return if not running interactively | |
| [ -z "$PS1" ] && return | |
| # don't put duplicate lines or lines starting with space in the history | |
| HISTCONTROL=ignoreboth:erasedups | |
| # ignores placing the exit command in history |
| (function($) | |
| { | |
| $(document).on('input', 'textarea', function() | |
| { | |
| var $this = $(this); | |
| var padTop = parseInt($this.css('padding-top'), 10); | |
| var padBot = parseInt($this.css('padding-bottom'), 10); | |
| $this.height(0); | |
| var scroll = $this.prop('scrollHeight'); | |
| $this.height(scroll - padTop - padBot); |
| <?php | |
| function actionByBit($actions, $dec, $bits) | |
| { | |
| for($i = 0, $count = count($actions); $bits > 0; $i++) | |
| if($dec & 1 << --$bits && $i < $count) | |
| $actions[$i](); | |
| } | |
| $hex = '70 0C 00 00'; |
| FROM ubuntu:14.04 | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN ln -snf /usr/share/zoneinfo/Europe/Madrid /etc/localtime && echo "Europe/Madrid" > /etc/timezone | |
| RUN apt-get -y update && apt-get -y install \ | |
| build-essential g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev \ | |
| libfreetype6 libssl-dev libpng-dev libjpeg-dev python libx11-dev libxext-dev git |