Skip to content

Instantly share code, notes, and snippets.

View Josef-Friedrich's full-sized avatar
🕶️
i’m fine

Josef Friedrich Josef-Friedrich

🕶️
i’m fine
View GitHub Profile
@pgundlach
pgundlach / viznodelist.lua
Last active January 10, 2022 01:43
LuaTeX nodelist visualization
--
-- viznodelist.lua
-- speedata publisher
--
-- Written 2010-2020 by Patrick Gundlach.
-- This file is released in the spirit of the well known MIT license
-- (see https://opensource.org/licenses/MIT for more information)
--
-- visualizes nodelists using graphviz
@igniteflow
igniteflow / rename.py
Created September 19, 2011 16:41
Python script to rename files in directory, transforming spaces to hyphens and the chars to lowercase
import os
"""
Renames the filenames within the same directory to be Unix friendly
(1) Changes spaces to hyphens
(2) Makes lowercase (not a Unix requirement, just looks better ;)
Usage:
python rename.py
"""
@petasittek
petasittek / gist:1378951
Last active July 1, 2023 01:24
Find all subdomains of given domain with dig
# let's dig the server
dig example.com
# from the DNS answer we are interested in the authority section
#;; AUTHORITY SECTION:
#example.com. 79275 IN NS a.iana-servers.net.
#example.com. 79275 IN NS b.iana-servers.net.
# now we find out all subdomains
dig @a.iana-servers.net example.com axfr
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
#!/bin/sh
for file in "$@"; do
if test "${file##*.}" = "svg" -a \( ! -e "${file%.svg}.eps" -o "$file" -nt "${file%.svg}.eps" \)
then
inkscape "$file" -E "${file%.svg}.eps"
fi
done
@brandonmwest
brandonmwest / gist:3536551
Created August 30, 2012 18:23
Hierarchical tree of pages in Jekyll
require 'digest/md5'
module Jekyll
# Add accessor for directory
class Page
attr_reader :dir
end
class NavTree < Liquid::Tag
def render(context)
@danielpradilla
danielpradilla / index.html
Last active August 27, 2020 11:40
HTML5 skeleton
<!DOCTYPE html>
<html>
<head>
<title>title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
</head>
<body>
<h1>Hello, world</h1>
<script src="http://code.jquery.com/jquery.js"></script>
@syzdek
syzdek / ipv6-regex-test.sh
Last active March 20, 2024 11:09
Simple script to test my IPv6 regular expression.
#!/bin/sh
#
# Use posixregex CLI tool from: https://github.com/syzdek/dmstools/blob/master/src/posixregex.c
RE_IPV4="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
posixregex -r "^(${RE_IPV4})$" \
127.0.0.1 \
10.0.0.1 \
192.168.1.1 \
@plentz
plentz / nginx.conf
Last active May 17, 2024 09:08
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ebirn
ebirn / check_snapshot_creation
Created February 13, 2014 13:33
Nagios check for zfs snapshot creation date, checks the age of the most recent snapshot
#!/bin/sh
FSNAME=$1
WARNAGE=$2
CRITAGE=$3
NOW=$(/bin/date +%s)
ZFS="sudo /sbin/zfs"