Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
# Apt-install various things necessary for Ruby, guest additions, | |
# etc., and remove optional things to trim down the machine. | |
apt-get -y update | |
apt-get -y remove apparmor | |
apt-get -y install linux-headers-$(uname -r) build-essential | |
apt-get -y install zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev libssl-dev openssl libreadline5-dev | |
apt-get clean | |
# Remove this file to avoid dhclient issues with networking | |
rm -f /etc/udev/rules.d/70-persistent-net.rules |
import javax.net.ssl.SSLParameters; | |
import javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { |
/** | |
* Modify the parts you need to get it working. | |
*/ | |
var should = require('should'); | |
var request = require('../node_modules/request'); | |
var io = require('socket.io-client'); | |
var serverUrl = 'http://localhost'; |
#!/bin/sh | |
# | |
# Installation: | |
# To use this script, place it in the commands directory of your | |
# gitolite installation. (Hint: ~/gitolite/src/commands/) | |
# You will also have to add the command to the allowed commands in | |
# your .gitolite.rc configuration file. | |
# | |
# Permissions: | |
# The script requires the same permissions as the desc command. |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
@Grab('org.asciidoctor:asciidoctor-java-integration') | |
import org.asciidoctor.Asciidoctor | |
import org.asciidoctor.Attributes | |
import org.asciidoctor.OptionsBuilder | |
import org.asciidoctor.SafeMode | |
import static org.asciidoctor.Asciidoctor.Factory.create | |
//println 'Starting...' |
kibana_host: logstash.openstack.org | |
alerts: | |
messagealert2: | |
field: message | |
query: eyJzZWFyY2giOiIiLCJmaWVsZHMiOltdLCJvZmZzZXQiOjAsInRpbWVmcmFtZSI6OTAwLCJncmFwaG1vZGUiOiJjb3VudCJ9 | |
limit: 10 |
input { | |
file { | |
type => "php-error" | |
path => "/var/www/error_log" | |
sincedb_path => "/opt/logstash/sincedb-access" | |
} | |
} |
This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.
Most the credit for these changes go to Dave Holland.