Skip to content

Instantly share code, notes, and snippets.

View dhrrgn's full-sized avatar
🦙

Dan Horrigan dhrrgn

🦙
  • OH, USA
  • 06:47 (UTC -04:00)
View GitHub Profile
@dhrrgn
dhrrgn / elasticsearch.yml
Created July 20, 2015 20:45
Ansible playbook for installing Elasticsearch (does not include configuration)
---
- name: Add the Oracle Java PPA
apt_repository: repo='ppa:webupd8team/java' state=present update_cache=yes
- name: Automatically select the Oracle License
debconf: name=oracle-java8-installer question=shared/accepted-oracle-license-v1-1 value=true vtype=select
- name: Install Java 8
apt: pkg=oracle-java8-installer force=yes state=installed
# Usage: @HAL tombstone First Line / Second Line / Third Line / Fourth Line
module.exports = (robot) ->
robot.respond /tombstone (.*)/i, (res) ->
lines = res.match[1].split '/'
if lines.length > 4:
res.reply "Too many lines. Max 4."
else
query = for i, line of lines
"top#{parseInt(i)+1}=#{encodeURIComponent(line)}"
- name: Set Max Open File limit
sysctl: name="fs.file-max" value=2097152 sysctl_set=yes state=present reload=yes
<?php
namespace Core\Middleware;
use Slim\Middleware;
/**
* A Middleware implemenation which will send any exceptions to the Slim
* error handler.
* @package Core\Middleware
---
- name: Install libfontconfig1
apt: pkg=libfontconfig1 state=installed
- name: Download phantomjs
get_url: url=https://bitbucket.org/ariya/phantomjs/downloads/{{phantomjs.name}}.tar.bz2 dest=/usr/local/share/{{phantomjs.name}}.tar.bz2 validate_certs=no
- name: Unpack phantomjs
command: tar xvjf /usr/local/share/{{phantomjs.name}}.tar.bz2 -C /usr/local/share creates=/usr/local/share/{{phantomjs.name}}
-='cd -'
..='cd ..'
...='cd ../..'
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
6='cd -6'
7='cd -7'
frontend incoming
# Stuff here ...
# www to non-www redirect
redirect prefix https://domain.com code 301 if { hdr_beg(host) -i www. }
# Stuff here ...
@dhrrgn
dhrrgn / Vagrantfile
Last active September 24, 2024 14:42
# ...
config.vm.provider :virtualbox do |v|
# ... Other stuff here
# Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
end
# ...
@dhrrgn
dhrrgn / config.xml
Last active August 29, 2015 14:07
Phonegap Config for iPhone 6 and 6+
<!-- rest of config here -->
<!-- iOS 8 Override Config to support iPhone 6/6+ screen size -->
<gap:config-file platform="ios" parent="UILaunchImages" overwrite="true">
<array>
<!-- iPhone 4s -->
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>
@dhrrgn
dhrrgn / Foo.php
Created September 15, 2014 15:24
<?php
class Foo {
private $closure;
public function __construct(Closure $closure)
{
$this->closure = $closure;
}