Skip to content

Instantly share code, notes, and snippets.

View tolleiv's full-sized avatar

Tolleiv Nietsch tolleiv

  • Bare.ID Gmbh - an AOE Group company
  • Wiesbaden, Deutschland
View GitHub Profile
@jed
jed / LICENSE.txt
Created May 26, 2011 17:39 — forked from 140bytes/LICENSE.txt
get a supported XHR instance
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
@evansd
evansd / postinstall.sh
Created June 28, 2011 21:30
postinstall sript from vagrant example box (having it somewhere web-accessible is easiest way to get it on to newly created VMs)
# 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
@4ndrej
4ndrej / SSLPoke.java
Last active January 3, 2024 09:50
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
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 {
@jmyrland
jmyrland / test.js
Last active January 19, 2024 18:51
Socket-io load test?
/**
* 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';
@vStone
vStone / gitolite-gitweb-command-web.sh
Last active December 17, 2015 09:49
Additional gitolite command to show or set gitweb.* configuration for user-created ("wild") repo.
#!/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.
@willurd
willurd / web-servers.md
Last active May 6, 2024 13:43
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@der3k
der3k / adoc.groovy
Created July 6, 2013 10:50
Render Asciidoc using Groovy
@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...'
@torbjornvatn
torbjornvatn / config.yml
Created March 25, 2014 22:31
Kibana alerter for Dashing
kibana_host: logstash.openstack.org
alerts:
messagealert2:
field: message
query: eyJzZWFyY2giOiIiLCJmaWVsZHMiOltdLCJvZmZzZXQiOjAsInRpbWVmcmFtZSI6OTAwLCJncmFwaG1vZGUiOiJjb3VudCJ9
limit: 10
@gerardorochin
gerardorochin / php_error_logstash.conf
Created June 2, 2014 15:39
php error logging into logstash + elasticsearch and trace errors on single line and root path hidden
input {
file {
type => "php-error"
path => "/var/www/error_log"
sincedb_path => "/opt/logstash/sincedb-access"
}
}
@albertbori
albertbori / Installation.md
Last active May 4, 2024 18:21
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

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.

Requirements

  • Mac OSX 10+
  • Administrator privileges