Skip to content

Instantly share code, notes, and snippets.

View pongstr's full-sized avatar
:octocat:

pongstr pongstr

:octocat:
View GitHub Profile

Git Magic

How to fetch remote changes?

 > git fetch --all
 > git fetch --tags

How to move and push a tag?

@pongstr
pongstr / .bootstrap
Last active August 29, 2015 14:19
Backbone.js Boilerplate
#!/bin/bash
FILES="config.js app.js"
function initialize {
for file in $FILES
do
echo "moved $file to /app"
mv $file app
done
body {
padding-bottom: 25px;
font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, sans-serif;
}
.text-danger {
color: #D64242;
}
.text-warning {
@pongstr
pongstr / style.css
Created May 22, 2015 01:05
JSONView Base16 Ocean Dark
html,
body {
font-family: Consolas, Menlo, Monaco, monospace;
font-size: 13px;
color: #c0C5ce;
line-height: 1.4;
white-space: pre;
background-color: #2b303b !important;
}
@pongstr
pongstr / heroku.sh
Last active August 29, 2015 14:25
Heroku Stuff.
# Put app to offline.
$ heroku maintenance:on --app APP
# Put app back online.
$ heroku maintenance:off --app APP

Ubuntu Mate: Raspberry Pi 2 or 1

Download Image from the official website:

# Copy image to SDHC: where rdisk[X] is the target sdhc
# run `diskutil list` to be sure
$ sudo dd if=ubuntu-mate-15.04-desktop-armhf-raspberry-pi-2.img of=/dev/rdisk[X] bs=1m
@pongstr
pongstr / .vimrc
Last active September 21, 2015 03:19
vm vim shits
" .vimrc
" Disable Vi compatibility
set nocompatible
if has("syntax")
" Enable syntax highlighting
syntax enable
" Set colorscheme
silent! colorscheme base-16
@pongstr
pongstr / tutorial_1.sh
Created September 23, 2015 06:41 — forked from fikriauliya/tutorial_1.sh
Docker
$ sudo docker run ubuntu:14.04 /bin/echo 'Hello world'
# The -t flag assigns a pseudo-tty or terminal inside our new container and the -i flag allows us to make an interactive connection by grabbing the standard in (STDIN) of the container.
$ sudo docker run -t -i ubuntu:14.04 /bin/bash
# A Daemonized Hello world
$ sudo docker run -d ubuntu:14.04 /bin/sh -c "while true; do echo hello world; sleep 1; done"
1e5535038e285177d5214659a068137486f96ee5c2e85a4ac52dc83f2ebe4147
$ sudo docker ps
@pongstr
pongstr / a_bootstrap.sh
Last active September 23, 2015 07:47
Docker
#!/bin/bash
set -e
set -u
pkg_install () {
YUMPKG=(
curl-devel
expat-devel
gettext-devel
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes