Skip to content

Instantly share code, notes, and snippets.

---
- name: Check /etc/elasticsearch/jvm.options exists
stat:
path: /etc/elasticsearch/jvm.options
become: true
register: elastic_jvm_options
- name: Check /etc/logstash/jvm.options exists
stat:
path: /etc/logstash/jvm.options
:: Init Script for cmd.exe
:: Sets some nice defaults
:: Created as part of cmder project
:: Find root dir
@if not defined CMDER_ROOT (
for /f %%i in ("%ConEmuDir%\..\..") do @set CMDER_ROOT=%%~fi
)
:: Change the prompt style
def flipCounter(stack):
result = 0
prev = '+'
first = True
for ch in stack:
if ch != prev and not first:
result += 1
prev = ch
first = False
@sclarson
sclarson / snapshot.sh
Created January 28, 2016 18:17
Snapshot some information on a linux server to establish a baseline in a really basic way
#!/bin/bash
EXT=`date +%H%M%S`
DAY=`date +%d`
mkdir -p ~/psaux
DIR="~/psaux/$DAY"
mkdir -p $DIR
free -m > $DIR/free.$EXT
ps aux > $DIR/ps.$EXT
top -n 1 -b > $DIR/top.$EXT
iostat -xm -p sda 3 3 > $DIR/iostat.$EXT
var gulp = require('gulp');
var exec = require('child_process').exec;
var lintCommand = "cpplint *.cpp";
var buildCommand = 'g++ -std=c++11 -I/Users/scl/homebrew/include -L/Users/scl/homebrew/lib -lpugixml *.cpp && ./a.out';
gulp.task('build', function(){
exec(lintCommand, function (error, stdout, stderr){
console.log(lintCommand);
console.log(stdout);
console.log(stderr);

Keybase proof

I hereby claim:

  • I am sclarson on github.
  • I am sclarson (https://keybase.io/sclarson) on keybase.
  • I have a public key whose fingerprint is 62AE 9EF7 27BB 8FCC 80DE 5C75 E53D 3214 2848 E10F

To claim this, I am signing this object:

@sclarson
sclarson / gist:0e0b70325312085766b8
Created September 24, 2015 04:22
Sample of .Net Rocks Geekout Episodes
Cryptocurrency Geek Out!:
http://www.dotnetrocks.com/?show=950
https://s3.amazonaws.com/dnr/dotnetrocks_0950_cryptocurrency.mp3
Geeking Out on Thorium:
http://www.dotnetrocks.com/?show=864
https://s3.amazonaws.com/dnr/dotnetrocks_0864_thorium.mp3
ShowLinks:
http://spectrum.ieee.org/static/special-report-water-vs-energy
http://singularityhub.com/2012/12/11/norway-begins-four-year-test-of-thorium-nuclear-reactor/
@sclarson
sclarson / output
Created June 3, 2015 19:56
Unserialize link
phinas@trogdor$ php unserialize-link-maybe.php 20
Attach 8 MB shared memory segment
Memory after my_array creation: 524288 -> 25427968 (+24903680 +23.75 MB, initial +24903680 +23.75 MB)
Memory used by serialized my_array 1st element: 335 B, used by serialized my_array: 3.26 MB, 10000 elements
Memory after unset#001: 26214400 -> 26738688 ( +524288 +512 kB, initial +524288 +512 kB)
Memory after unset#003: 26738688 -> 27000832 ( +262144 +256 kB, initial +786432 +768 kB)
Memory after unset#004: 27000832 -> 26738688 ( -262144 -256 kB, initial +524288 +512 kB)
Memory after unset#005: 26738688 -> 27000832 ( +262144 +256 kB, initial +786432 +768 kB)
Memory after unset#006: 27000832 -> 27787264 ( +786432 +768 kB, initial +1572864 +1.5 MB)
Memory after unset#007: 27787264 -> 28573696 ( +786432 +768 kB, initial +2359296 +2.25 MB)
accountsservice install
acl install
acpi-support install
acpid install
adduser install
aisleriot install
alsa-base install
alsa-utils install
anacron install
apg install
app.service('ShortageItems', [
'$resource', function($resource) {
var host = document.location.hostname == "localhost" ? "/ShortageLines" : "/ShortageReport/ShortageLines";
return $resource(host + '/:action/:id', null, {
'save': { method: 'POST', params: { action: 'Save' } },
'update': { method: 'POST', params: { action: 'Update' } },
'get': { method: 'GET', params: { action: 'details' } },
'query': {
method: 'GET',