Skip to content

Instantly share code, notes, and snippets.

@nshtg
nshtg / cheatsheet.coffee
Last active August 29, 2015 14:02
Public and private vars, class variables and functions...
class Foo
PublicProperty: "I am public"
_privateVariable = "I am private"
@classConst = "I'm from the class mister"
constructor: ->
@publicPropertyToBeSet = "lopl"
publicMethod: -> @PublicProperty
_privateMthod = -> _privateVariable
@nshtg
nshtg / zams.py
Last active August 29, 2015 14:04
Proof of concept for zams db
#!/usr/bin/env python3
"""
Shebang python3
"""
import re
import sqlite3
INT_TO_CHAR = ['A', 'B', 'C', 'D', 'E']
'editor':
'lineHeight': 1.45
'softWrap': true
'normalizeIndentOnPaste': true
'tabLength': 2
'preferredLineLength': 100
'invisibles':
'cr': '↩'
'eol': ''
'space': '·'
@nshtg
nshtg / cmake.sh
Last active January 31, 2016 00:17
Clone the latest zsh sources and install them to /usr/local
#!/bin/sh
wget https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz -O /tmp/cmake.tar.gz
sudo tar --strip-components 1 -xzvf /tmp/cmake.tar.gz -C /usr/local
@nshtg
nshtg / git-daemon.service
Created January 27, 2016 20:40
Git Server
[Unit]
Description=Git Daemon
[Service]
Type=forking
ExecStart=/usr/local/libexec/git-core/git-daemon --user=git --group=git --base-path=/home/git/repositories --detach
[Install]
WantedBy=multi-user.target
@nshtg
nshtg / install_teamspeak.sh
Last active March 4, 2016 02:37 — forked from x3ro/install_teamspeak.sh
Teamspeak 3 installation script for Debian based systens (incl. Ubuntu)
#!/bin/bash
#
# A small script that sets up a teamspeak 3 server.
# Tested on debian and ubuntu.
#
# Source: http://coding-journal.com
#
TMP="/tmp/teamspeak/"
INSTALL_PATH="/usr/local/teamspeak3/"
@nshtg
nshtg / README.md
Created March 7, 2016 17:11 — forked from nickbudi/README.md
Budi's Counter-Strike: Global Offensive config

Budi's CS:GO Config

This is my constantly updated CS:GO autoexec config.

Put autoexec.cfg in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg or take what you want from it and add to your autoexec config!

After the lovely Wild West RNG Simulator 2015 update, video.txt needs to be put in ...\Steam\userdata\<Steam3 ID>\730\local\cfg

Launch Options

@nshtg
nshtg / Cargo.toml
Created July 25, 2016 11:41 — forked from p-jackson/Cargo.toml
Https with hyper on Windows without using OpenSSL
[dependencies]
schannel = "0.0.2"
[dependencies.hyper]
version = "0.7"
default-features = false
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 16,
// font family with optional fallbacks
@nshtg
nshtg / caddy.sh
Last active June 23, 2017 08:41 — forked from Jamesits/caddy.sh
Install Caddy Server on Centos with Systemd.
useradd www-data --system || true
curl -L https://getcaddy.com | bash -s http.awslambda,http.cgi,http.cors,http.expires,http.filemanager,http.filter,http.git,http.hugo,http.ipfilter,http.jwt,http.mailout,http.minify,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.upload,dns,net,hook.service
chown root:root /usr/local/bin/caddy
chmod 755 /usr/local/bin/caddy
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
mkdir -p /etc/caddy
chown -R root:www-data /etc/caddy
mkdir -p /etc/ssl/caddy
chown -R www-data:root /etc/ssl/caddy