Skip to content

Instantly share code, notes, and snippets.

View k0nsl's full-sized avatar
🎯
Focusing

k0nsl k0nsl

🎯
Focusing
View GitHub Profile
@blHdIjbJ
blHdIjbJ / massrbl.php
Created January 28, 2012 21:24
simple mass RBL check
<?php
function rblcheck($host) { // Note: I have no idea how well suited CBL is for this purpose. If it gets annoying we can remove it ~ Aurora
$rbls = array('sbl-xbl.spamhaus.org', 'rbl.efnet.org', 'cbl.abuseat.org', 'dnsbl.dronebl.org');
foreach($rbls as $rbl) {
$lookup = implode('.', array_reverse(explode('.', $host))) . '.' . $rbl;
if (strstr(gethostbyname($lookup), "127.0.0")) {
return $rbl;
}
}
return 0;
@JimWestergren
JimWestergren / index-with-redis.php
Last active February 11, 2023 18:28
Redis as a Frontend Cache for WordPress
<?php
/*
Author: Jim Westergren & Jeedo Aquino
File: index-with-redis.php
Updated: 2012-10-25
This is a redis caching system for wordpress.
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/
@0x9900
0x9900 / dnstest.py
Last active February 15, 2017 20:07
Quick and dirty speed test for public DNS services.
#!/usr/bin/env python
#
import DNS
import time
import sys
from collections import defaultdict
services = {
#'local': ['192.168.10.1'],
@ecampidoglio
ecampidoglio / cpustatus.sh
Created February 21, 2013 23:42
A Bash script that prints the current state of the CPU on a Raspberry Pi. It displays variables like temperature, voltage and speed.
#!/bin/bash
# cpustatus
#
# Prints the current state of the CPU like temperature, voltage and speed.
# The temperature is reported in degrees Celsius (C) while
# the CPU speed is calculated in megahertz (MHz).
function convert_to_MHz {
let value=$1/1000
echo "$value"
@chrisboulton
chrisboulton / ip_blacklist.lua
Last active April 2, 2024 10:43
Redis based IP blacklist for Nginx (LUA)
-- a quick LUA access script for nginx to check IP addresses against an
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403.
--
-- allows for a common blacklist to be shared between a bunch of nginx
-- web servers using a remote redis instance. lookups are cached for a
-- configurable period of time.
--
-- block an ip:
-- redis-cli SADD ip_blacklist 10.1.1.1
-- remove an ip:
anonymous
anonymous / fawk
Created November 21, 2014 21:59
A Bash shell function to save your fingers from typing "awk '{ print $5 }'" all the time
# Inspiration: http://serverfault.com/a/5551 (but basically rewritten)
function fawk() {
USAGE="\
usage: fawk [<awk_args>] <field_no>
Ex: getent passwd | grep andy | fawk -F: 5
"
if [ $# -eq 0 ]; then
echo -e "$USAGE" >&2
return
#exit 1 # whoops! that would quit the shell!
@rehno-lindeque
rehno-lindeque / NixSetup.md
Last active April 2, 2024 20:18
NixOS Setup (Virtualized + Haskell + Gnome3 + XMonad)

Setup NixOS (Virtualized + Haskell + Gnome3 + XMonad)

Before you get started

This is pretty out of date now... you may want to look elsewhere

Newer guides than mine (mine is a bit dated and has a lot of rough edges):

Have you looked at these?

@k0nsl
k0nsl / blast-from-the-past.txt
Created January 7, 2016 20:15
A blast from the past. This is from the time when Irving originally caved in after his arrest in Austria. - HAC.
THE BALLAD OF DAVID "BLACKADDER" IRVING
(sung to the theme song of "Black Adder")
From some gormless public school,
Came forth Revision's brightest scholar,
Toffee-nosed, but he's no fool,
He raked in quids and marks and dollars!
Dave Irving, Dave Irving,
With nothing left to lose,
@Kovah
Kovah / hn-theme-amber.md
Last active September 22, 2016 15:45
Hacker News Theme Amber
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###