Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
set -u
# hat-tips:
# - http://codeghar.wordpress.com/2011/12/14/automated-customized-debian-installation-using-preseed/
# - the gist
#!/bin/bash
# <UDF name="user_name" label="Unprivileged user account name" example="This is the account that you will be using to log in or deploy (deployer)." default="deployer" optional="false" />
# <UDF name="user_password" label="Unprivileged user password" optional="false" />
# <UDF name="user_sshkey" label="Public Key for user" default="" example="Recommended method of authentication. It is more secure than password log in." optional="false" />
# <UDF name="user_shell" label="Shell" oneof="/bin/zsh,/bin/bash" default="/bin/bash" />
# <UDF name="sys_hostname" label="System hostname" default="myvps" example="Name of your server, i.e. linode1." optional="false" />
# <UDF name="sys_private_ip" Label="Private IP" default="" example="Configure network card to listen on this Private IP (if enabled in Linode/Remote Access settings tab). See http://library.linode.com/networking/configuring-static-ip-interfaces" optional="false" />
USER_GROUPS=sudo
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import json
# Linode API Key
key = 'API_KEY'
# set your VPS root password
root_pass = 'AWESOME_PASSWORD'
#!/bin/bash
#
# Security StackScript
# By Donald von Stufft <donald.stufft@gmail.com>
#
# <udf name=&quot;user_name&quot; label=&quot;Unprivileged User Account&quot; />
# <udf name=&quot;user_password&quot; label=&quot;Unprivileged User Password&quot; />
# <udf name=&quot;user_sshkey&quot; label=&quot;Public Key for User&quot; default=&quot;&quot; />
#
#!/bin/bash
# <UDF name="HOSTNAME" Label="server hostname" default="linode"/>
# <udf name="PACKAGES" label="Packages to install" manyOf="Varnish, Nginx, Postgres, Redis, Beanstalk, Memcache" default="">
###########################################################
# System Helpers
###########################################################
function system_update {
apt-get update

S5

S5 is an abbreviation for Snap Serv Server Stack Script. Basically it is meant for setting up a fresh Debian Wheezy x86/x64 system. You can read everything it does in config.sh, which is an example config. Remember to adjust to example configuration to some sane values.

Usage

  1. Connect to your fresh server

  2. Adjust network configuration if necessary

  3. Download s5.sh and config.sh into /root:

@np43
np43 / PostGIS 2.0 Cheatsheet.md
Created March 29, 2019 22:05 — forked from kidpixo/PostGIS 2.0 Cheatsheet.md
PostGIS 2.0 Cheatsheet
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@np43
np43 / gist:c352210157689eb7c6390e3cecf0686f
Created June 24, 2019 22:09
process map with loaded libraries
# Get the pid of the process to be inspected, and get the list of the libraries used by looking at the corresponding map file.
#i.e. for pid 10213
cat /proc/10213/maps | grep .so | cut -d/ -f2- | sort -u
@np43
np43 / hosts.txt
Created August 17, 2019 07:05 — forked from Ifiht/hosts.txt
Full telehack hosts list
host organization location
---- ------------ --------
3comvax 3Com Corporation Santa Clara, CA
a3bee2 Compusoft Wallingford, CT
aaachoo AAA National Head Quarters - NTS/OTI Virginia
aaahq01 American Automobile Association, Hea Heathrow, Florida
aablue AA Blueprint Co., Inc. Ohio
aai Amerinex Artificial Intelligence Amherst, MA
aaisd Advantest America Inc., Software Div Santa Clara, CA
aardvark Steve's Unix System, Portland Portland, Oregon