Skip to content

Instantly share code, notes, and snippets.

View uplime's full-sized avatar
👻
Spooky

Nicholas Chambers uplime

👻
Spooky
View GitHub Profile
@tristanwagner
tristanwagner / dbdump.py
Last active November 12, 2024 02:03
CSV list of items id and names Vanilla WoW 1.12.1 from https://github.com/LightsHope/database
# encoding=utf8
import sys
import csv
import mysql.connector
# Connect to MSSQL Server
try:
conn = mysql.connector.connect(host="", user="",password="", database="")
@Thermi
Thermi / Best Practices.md
Last active May 20, 2022 09:01
Summary page of the Netfilter related resources

Best Practices:

  1. Don't use iptables to apply your rules one at a time, use iptables-restore to apply a whole ruleset in one action.
  2. Set your INPUT and FORWARD policy to DROP.
  3. Don't set your OUTPUT policy to DROP unless you really know what you're doing.
  4. If you're going to implement a blacklist or whitelist, you should look at using ipsets if that list is going to be more than two or three addresses, and if it might be dynamic.
  5. Allow all traffic on lo.
  6. You should ALLOW traffic in ctstates of RELATED and ESTABLISHED near the beginning of your rules
  7. Don't use iptables -L
  8. DON'T USE IPTABLES -L
  9. Use iptables-save instead of iptables -L.
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 12, 2025 20:05
Hyperlinks in Terminal Emulators
@zenorocha
zenorocha / etc-hosts-on-win.md
Last active February 25, 2025 11:01
/etc/hosts on Windows

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file

notepad

@aspyatkin
aspyatkin / generate_csr.rb
Last active October 7, 2023 18:20
Generate X509 CSR with SAN extension in Ruby
require 'openssl'
# Generate X509 CSR (certificate signing request) with SAN (Subject Alternative Name) extension and sign it with the RSA key
def generate_csr(common_name, organization, country, state_name, locality, domain_list)
# create signing key
signing_key = OpenSSL::PKey::RSA.new 2048
# create certificate subject
subject = OpenSSL::X509::Name.new [
['CN', common_name],
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 13, 2025 15:10
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@arusso
arusso / make-san-cert.rb
Last active June 1, 2021 21:20
Generating a SAN Certificate in Ruby
require 'openssl'
require 'openssl-extensions/all'
keyfile = '/tmp/mycert.key'
csrfile = '/tmp/mycert.csr'
file = File.new(keyfile,'w',0400)
key = OpenSSL::PKey::RSA.new 2048
file.write(key)
@mniip
mniip / 2048.sh
Created March 25, 2015 02:33
A 2048 clone for those who can't afford a desktop environment. Runs in sh!
#!/bin/sh
print_cell()
{
if [ "$1" = 0 ]; then
echo -en " "
else
if [ "$1" -ge 128 ]; then
echo -en '\x1B[33m'
elif [ "$1" -ge 16 ]; then
echo -en '\x1B[31m'
@mniip
mniip / timer.c
Last active December 31, 2016 05:04
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <signal.h>
#include <curses.h>
void quit()
{
endwin();
@ormaaj
ormaaj / multidim.bash
Last active February 21, 2019 22:19
Non-serious bash 2d array implementation
#!/usr/bin/env bash
function getElem {
while
${!1+\:} return 1
typeset -a "__getElemArr=${!1}"
set -- "__getElemArr${1#*]}"
[[ $1 == *\[!(@]|\*]) ]]
do :
done