This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here’s how to create UDP syslog messages via nc, netcat: | |
echo ‘<14>_sourcehost_ messagetext’ | nc -v -u -w 0 _syslog-host_ 514 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |