DocPad: Query custom category objects (via parse event)
See http://stackoverflow.com/a/14381327/130638 for explanation.
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
#!/bin/bash | |
# @jsdavo 6th July 2012 | |
# Derived mainly from https://onabai.wordpress.com/2012/05/10/installing-couchdb-1-2-in-ubuntu-12-04/ | |
# @llazzaro 8th Nov 2016: Update to work with ubuntu 16 | |
# For Ubuntu 16 | |
# Get some 300MB of dependencies | |
sudo apt-get install automake autoconf libtool subversion-tools help2man | |
sudo apt-get install build-essential erlang libicu-dev |
I followed the instructions from http://blog.scottlowe.org/2014/01/23/automatically-connecting-lxc-to-open-vswitch/ but wasn't happy with the script
# pip install shyaml
# cat /var/lib/lxc/vm1/config
#!/bin/bash | |
# ----------------------------------------------------------------------- | |
# Installs Ruby 2.2 using rbenv/ruby-build on the Raspberry Pi (Raspbian) | |
# | |
# Run from the web: | |
# bash <(curl -s raw_script_url_here) | |
# ----------------------------------------------------------------------- | |
# Set up variables |
opkg install kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-storage e2fsprogs fdisk usbutils mount-utils block-mount kmod-fs-ext4 kmod-fs-vfat kmod-nls-utf-8 kmod-nls-cp437 kmod-nls-iso8859-1
reboot
blkid
, run opkg update && opkg install blkid
;block.sh
to directory /lib/functions
;10-mount
and 20-swap
to directory /etc/hotplug.d/block
;logread -f
command then plug in a USB stick to test.""" | |
setup: | |
pip install requesocks | |
super helpful: | |
http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/ | |
""" | |
import requests | |
import requesocks |
#!/usr/bin/env python2 | |
""" | |
Author: takeshix <takeshix@adversec.com> | |
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org). | |
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
""" | |
import sys,struct,socket | |
from argparse import ArgumentParser |
#!/bin/bash | |
# www.fduran.com | |
# script that will send an email to EMAIL when disk use in partition PART is bigger than %MAX | |
# adapt these 3 parameters to your case | |
MAX=95 | |
EMAIL=alert@example.com | |
PART=sda1 | |
USE=`df -h |grep $PART | awk '{ print $5 }' | cut -d'%' -f1` | |
if [ $USE -gt $MAX ]; then |