Skip to content

Instantly share code, notes, and snippets.

View spac3unit's full-sized avatar

Denis spac3unit

View GitHub Profile
@spac3unit
spac3unit / tmux-cheatsheet.markdown
Created December 1, 2016 14:28 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@spac3unit
spac3unit / span-responsive-output.scss
Created December 23, 2016 03:05
span-responsiv sass mixin based on Susy
/*
SPAN-RESPONSIVE
Create responsive, mobile first gallery-like grids using Susy.
Columns have the same size, only the amount of columns in a row change.
Accepts a single argument as a list.
$example-layouts: 2 30em, 4 50em, 8 60em;
@spac3unit
spac3unit / Python3 Virtualenv Setup
Created February 7, 2017 22:22 — forked from evansneath/Python3 Virtualenv Setup
Setting up and using Python3 Virtualenv
To install virtualenv via pip
$ pip3 install virtualenv
Note that virtualenv installs to the python3 directory. For me it's:
$ /usr/local/share/python3/virtualenv
Create a virtualenvs directory to store all virtual environments
$ mkdir somewhere/virtualenvs
Make a new virtual environment with no packages
@spac3unit
spac3unit / web-servers.md
Created February 9, 2017 00:30 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@spac3unit
spac3unit / imgur
Created March 5, 2017 02:09 — forked from vivien/imgur
Shell script to upload image(s) to imgur.com
#!/bin/sh
#
# Upload image(s) to imgur.com
# Copyright (C) 2014 Vivien Didelot <vivien@didelot.org>
# Licensed under GPL version 3, see http://www.gnu.org/licenses/gpl.txt
#
# Requires "jshon":
# http://kmkeen.com/jshon/
#
# Alternatives, which suck:
@spac3unit
spac3unit / gist:8d619bfee55103bc1b49400cff38a189
Created March 27, 2017 23:48 — forked from Atem18/gist:4696071
Tutorial to seting up a django website in production.

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
@spac3unit
spac3unit / form.pug
Created June 7, 2017 17:14 — forked from williammincy/form.pug
pug mixin for easy form field creation
mixin inputText(id, label, val)
div.row
label(for= id)= label
input(type="text", name= id, id= id, value= val,autocomplete="off")
mixin inputPassword(id, label, val)
div.row
label(for= id)= label
input(type="password", name= id, id= id, value= val,autocomplete="off")
@spac3unit
spac3unit / gulpfile.js
Created June 19, 2017 22:13 — forked from glebcha/gulpfile.js
Gulp task with Less processing (autoprefixer), live reload (browser-sync), javascript (es6, babelify, react), error handling, images optimization, jade templates
'use strict';
/*
Instructions:
1 - Should execute 'npm run prepare'
before the very first run, it will install and symlink all dependencies.
2 - Choose between production 'npm start' and development 'npm run start-dev' modes
(watcher will run immediately after initial run).
@spac3unit
spac3unit / encrypt_decrypt_gpg_armor.go
Created July 12, 2017 03:48 — forked from jyap808/encrypt_decrypt_gpg_armor.go
Symmetrically encrypting a string into ASCII armored GPG format and then Decrypting it in Golang
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"code.google.com/p/go.crypto/openpgp/armor"
"fmt"
"io/ioutil"
"log"
)
@spac3unit
spac3unit / public_key_encrypt_gpg_base64.go
Created July 12, 2017 03:57 — forked from jyap808/public_key_encrypt_gpg_base64.go
Public key encrypting a string into GPG format and outputting it in base64 encoding
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
)