Skip to content

Instantly share code, notes, and snippets.

View akDeveloper's full-sized avatar
👊
With great code comes great responsibility

Andreas Kollaros akDeveloper

👊
With great code comes great responsibility
View GitHub Profile
@justincjahn
justincjahn / vimdb.sh
Created November 29, 2011 01:03
Simple script that edits a bind zone file, updates the SOA line, commits to etckeeper, and restarts BIND.
#!/usr/bin/env bash
# The file we will be editing
FILE=/etc/bind/domain.tld
DOMAIN=domain.tld
# A path to the BIND init script
BIND=/etc/init.d/bind9
ETCKEEP=/usr/sbin/etckeeper
SUDO=/usr/bin/sudo
@splosch
splosch / md5_device_fingerprint.js
Last active March 6, 2018 20:50
Browser and device fingerprinting - a MD5 checksum generator to identify a device-browser-combination
(function(window, document, JSON){
"use strict";
var SEP = '|', ua, opera, ie;
/*
* Collect Browser & Device Data
*/
var Collector = {
/*
* MD5 Checksum calculation
*/
@hipsterjazzbo
hipsterjazzbo / solarized-colors.sh
Last active April 13, 2019 22:07
Solarized Colors as Bash Variables (ansi colors, xterm-256)
#!/bin/bash
BASE03="\[\033[38;5;234m\]"
BASE02="\[\033[38;5;235m\]"
BASE01="\[\033[38;5;240m\]"
BASE00="\[\033[38;5;241m\]"
BASE0="\[\033[38;5;244m\]"
BASE1="\[\033[38;5;245m\]"
BASE2="\[\033[38;5;254m\]"
BASE3="\[\033[38;5;230m\]"
@lcdss
lcdss / setup
Last active November 6, 2016 22:28
Elementary OS - PHP/Node.js Developers
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-add-repository -y ppa:philip.scott/elementary-tweaks
sudo apt-add-repository -y ppa:git-core/ppa
sudo apt-add-repository -y ppa:ondrej/php
sudo add-apt-repository -y ppa:webupd8team/java
sudo add-apt-repository -y ppa:mc3man/mpv-tests
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
@Mega-JC
Mega-JC / CameraLib.py
Last active November 16, 2021 11:04
Basic 2D Camera System for pygame using LayeredUpdates and a Camera class.
# Two user-friendly classes for integrating a 2D camera system for pygame.
#
# The first class is Camera2, which is essentially a 2D camera with rect-like behaviour. To setup something like player tracking, one can simply do:
### Cam2 = Camera2(area=(0, 0, WIDTH, HEIGHT), view_distance=1000)
### Cam2.center = player.rect.center
# for even more precise control, one can do:
### Cam2.anchor = (Cam2.w*0.3, Cam2.h*0.7) # some coordinate on the screen