Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<!-- The head tag - information about the page -->
<head>
<!-- Set the window title of the browser -->
<title>Test</title>
<!-- Set the character set to utf-8 -->
<meta charset="utf-8" />
<!-- Load a stylesheet from another file -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />
@lgoldstien
lgoldstien / preseed.cfg
Created January 2, 2017 15:07
selenium-hub-preseed
choose-mirror-bin mirror/http/proxy string
d-i base-installer/kernel/override-image string linux-server
d-i clock-setup/utc boolean true
d-i clock-setup/utc-auto boolean true
d-i finish-install/reboot_in_progress note
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string lvm
@lgoldstien
lgoldstien / selenium.sh
Last active January 2, 2017 16:17
Selenium standalone server init script
### BEGIN INIT INFO
# Provides: selenium
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: selenium
# Description: selenium standalone server acting as a hub
### END INIT INFO
@lgoldstien
lgoldstien / cloud-config.yaml
Created January 23, 2016 13:58
Basic cloud config
#cloud-config
hostname: "core1"
users:
- name: "lawrence"
groups:
- "sudo"
- "docker"
passwd: "$6$rounds=4096$wnPq6hkbWVsqhsn3$HBjn9g12lk0mQjKMbqtgcgV6XaI.4SjbRgTNhg65SdQ2Fa/6acTdzKrubmEmt8qgSm7y9FYZLBxdK/24gB0Zn/"
ssh-authorized-keys:
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3CKpO+BrJjSKozMTGL7CJcThTLHa4TSfojtRnFVBicbkz5OphX0GW2cyZ/F8E/pMnn3OGr+SRickayoZpCbo4Mc/R2HFTOkaNHHAoBPICBWyPAU9dwx475Jnw0Bjaozo1eevtMpv1buGkQdQZlSXN+tEoZfmB85Crh3+9BTyXNxwxncoy488EN883TEJK2VypesiNY2TiXwVGeoZjxa08i0bU6Z68LkSclI8JmJAXw3EW2M7wfl0n8nQQ88ViyZ14d/pfi4CqkRuvsL8Kz4u+d0nT6YSzUkBqtNIxWme08whYiiRV1J+ZwmgXwkfoHIPUo35TjPhV6b3gPYYd0Qmh"
@lgoldstien
lgoldstien / enable-ppa-post-dist-upgrade.sh
Created January 3, 2016 21:20
Enable any disabled apt repositories after dist update in ubuntu
#!/usr/bin/env bash
for f in /etc/apt/sources.list.d/*.save; do
echo "Processing $f file..";
sudo mv $f ${f::-5}
done
[nginx-req-limit]
enabled = true
filter = nginx-req-limit
action = iptables-multiport[name=ReqLimit, port="http,https", protocol=tcp]
logpath = /var/log/nginx/*error.log
findtime = 600
bantime = 7200
maxretry = 10
# Fail2Ban configuration file
#
# supports: ngx_http_limit_req_module module
[Definition]
failregex = limiting requests, excess:.* by zone.*client: <HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
@lgoldstien
lgoldstien / README.md
Created July 16, 2014 10:10
Wikileaks Afgan War Data

README is empty

/**
* textWidth
* Get the pixel width of a string before rendering it in the DOM, requires jQuery global
*
* @param {string} - The text string you want the pixel width of
* @param {string} - Any classes that need to be taken into account when calculating
*
* @return {integer} - The width in pixels of the text string
*/
var textWidth = function (string, classes) {
@lgoldstien
lgoldstien / menu.html
Created July 2, 2014 10:37
Facebook Style Counters on Bootstrap and Fontawesome Icons
<ul class="nav nav-tabs">
<a class="btn btn-default"><i class="fa fa-database"><span class="icon_counter icon_counter_red">5</span></i></a>
<a class="btn btn-default"><i class="fa fa-envelope"><span class="icon_counter icon_counter_blue">5</span></i></a>
<a class="btn btn-default"><i class="fa fa-fax"><span class="icon_counter icon_counter_green">5</span></i></a>
</ul>