Skip to content

Instantly share code, notes, and snippets.

@leafnode
leafnode / syslog_netcat.sh
Created Jul 15, 2019 — forked from dwallraff/syslog_netcat.sh
Use netcat to send syslog messages
View syslog_netcat.sh
# Here’s how to create UDP syslog messages via nc, netcat:
echo<14>_sourcehost_ messagetext’ | nc -v -u -w 0 _syslog-host_ 514
@leafnode
leafnode / iterm2-solarized.md
Created Mar 27, 2019 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel9k

Powerlevel9k

@leafnode
leafnode / pre-commit
Created May 15, 2018 — forked from ilyakatz/pre-commit
helpful precommit hooks
View pre-commit
#!/bin/bash -l
# A git hook script to find and fix trailing whitespace
# in your commits. Bypass it with the --no-verify option
# to git-commit
#
.git/hooks/pre-commit-master-no-no
if [[ $? == 1 ]]
then
@leafnode
leafnode / multihooks.py
Created May 15, 2018 — forked from carlos-jenkins/multihooks.py
Delegating script for multiple git hooks
View multihooks.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2017 Carlos Jenkins <carlos@jenkins.co.cr>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@leafnode
leafnode / devkitARMUpdate.pl
Created May 13, 2018 — forked from xvw/devkitARMUpdate.pl
Install or Update the DevKitARM with `perl devkitARMUpdate.pl`
View devkitARMUpdate.pl
#!/usr/bin/perl
#-----------------------------------------------------------------------------
#
# Copyright (C) 2011
# Michael Theall (mtheall)
# Dave Murphy (WinterMute)
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any
# damages arising from the use of this software.
@leafnode
leafnode / gist:d1a6b960bf8a65a291967723681ebf6a
Created Oct 3, 2016 — forked from jessedearing/gist:2351836
Create self-signed SSL certificate for Nginx
View gist:d1a6b960bf8a65a291967723681ebf6a
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
@leafnode
leafnode / gist:4441994
Last active Dec 10, 2015 — forked from anonymous/gist:4356672
Fetch all books from Wolne Lektury
View gist:4441994
import simplejson, requests, urllib, re
# -*- encoding: utf-8 -*-
from slughifi import slughifi
### http://trac.django-fr.org/browser/site/trunk/project/links/slughifi.py?rev=47
### with django's slugify hardcoded inside from:
### http://code.activestate.com/recipes/577257/
for z in simplejson.loads(requests.get("http://wolnelektury.pl/api/books/").content.decode('utf8')):
p = simplejson.loads(requests.get(z['href']).content)