Skip to content

Instantly share code, notes, and snippets.

View scry3r's full-sized avatar
:octocat:
^_^

_scry3r_ scry3r

:octocat:
^_^
View GitHub Profile
# become root
sudo -i
# flush all existing rules
iptables -F
# Accept traffic from existing connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# accept SSH connections
def request(linode_method, query_args = {})
begin
args = {
api_key: @api_key,
api_action: linode_method,
}.merge(query_args).map{|k,v| "#{k}=#{v}"}.compact.join('&')
uri = URI("https://api.linode.com/?#{args}")
http = Net::HTTP.new(uri.host, uri.port)
@scry3r
scry3r / Dockerfile
Last active October 26, 2017 12:45
PHP with extension
FROM php:7.0-fpm
# Get repository and install wget and vim
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
emacs \
git \
unzip
# Add PostgreSQL repository
@scry3r
scry3r / dockerinstall.sh
Last active October 21, 2017 17:24
Install docker
#!/bin/bash
set -eu -o pipefail # fail on error , debug all lines
# run as root
[ "$USER" = "root" ] || exec sudo "$0" "$@"
echo "=== $BASH_SOURCE on $(hostname -f) at $(date)" >&2
err_msg="\n\nthis script is only for Ubuntu 17.04 zesty, BUT you have: \n"$(lsb_release -a)
test $(lsb_release -cs) != "zesty" && echo -e "$err_msg"
#!/bin/bash
cd
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/sklgucver61.tar.bz2 && \
tar xvjf sklgucver61.tar.bz2 && cd skl_guc_ver6_1/ && sudo ./install.sh
cd
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kbldmcver101.tar.bz2 && \
@scry3r
scry3r / i3install.sh
Created October 12, 2017 19:50
i3-gaps
#!/bin/bash
# run with sudo
#-------------------------------------------------------------------------------
export DEBIAN_FRONTEND=noninteractive
apt-get update -q
apt-get upgrade -q -y
#if __has_include(".extend.Xresources")
#include ".extend.Xresources"
#endif
! ^ The above lines are no comments!
! Leave them as they are if a file ~/.extend.Xresources is being used on your system.
! config can be added there or also here below.
! For comments use "!"
Xft.dpi: 96
@scry3r
scry3r / .extend.Xresources
Created October 12, 2017 16:37
.extend.Xresources
! COLOR PALETTE HERE !
*.foreground: #EAD49B
*.background: #1E272B
*.cursorColor: #EAD49B
*.cursor: #EAD49B
*.color0: #1E272B
*.color1: #685742
*.color2: #9D6A47
*.color3: #B36D43
@scry3r
scry3r / .bashrc
Created October 12, 2017 16:36
Bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@scry3r
scry3r / dunstrc
Created October 12, 2017 16:34
dunst config
[global]
font = Ubuntu Mono, Bold 12
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see