Skip to content

Instantly share code, notes, and snippets.

- block:
- name: "install default packages after minimal install"
apt:
name: "{{ item }}"
state: present
with_items:
- "at"
- "attr"
- "auditd"
- "bc"
const Inversify = require('inversify');
const helpers = require("inversify-vanillajs-helpers").helpers;
require('reflect-metadata');
class A {
constructor() {
this.name = 'I am A!';
}
}
/**
* Created by Derek Rada on 3/10/2015.
*/
var SlackPlugin = require('../../lib/slackService/v3/slackPlugin');
var util = require('util');
var GiphyApi= require('./GiphyApi');
function GiphyPlugin() {
/**
* Created by Derek Rada on 3/10/2015.
*/
var http = require('http');
var qs = require("querystring");
var api_key = 'dc6zaTOxFJmzC'; // default beta key (need to change)
var util = require('util');
[global]
workgroup = DEREKRADA
server string = Samba Server Version %v
max protocol = SMB3
log level = 1
log file = /var/log/samba/log.%m
max log size = 100
security = user
passdb backend = tdbsam
load printers = yes
'use strict';
/*
npm install hapi@8.x.x
node thisfile.js
curl -XPOST http://localhost:4000/v1/lead/property
*/
var Hapi = require('hapi');
var server = new Hapi.Server();
#!/bin/bash
FILE=output.html
while [ 0 -eq 0 ]; do
echo "<style>body {background-color: #000000; color: #ffffff; text-align: center; font-family: Courier, Helvetica, sans-serif; color: #f4f5f7; font-size: 16px; text-transform: uppercase;} p { padding: 0; margin: 2px; }</style><h1>Server - Status</h1>" > $FILE
for num in {11..27}; do
curl -s --max-time 5 "http://nodejs${num}.dc3.homes.com/v1/ad/reporting/overall?api_key=00000000000000000000000000000&date_start=2015-12-01" >/dev/null 2>&1
status=$?
if [ $status -eq 0 ]; then
@Dirrk
Dirrk / plex-bandwidth.sh
Created January 26, 2016 03:18
Cap bandwidth for plex server
## All credit goes to this thread https://forums.plex.tv/discussion/39823/howto-limit-plex-media-server-bandwidth-on-linux
cat << EOF > /usr/local/bin/plex-traffic-shape
#!/bin/sh
# Setup Traffic Control to limit outgoing bandwidth
# Sourced from:
# * http://www.cyberciti.biz/faq/linux-traffic-shaping-using-tc-to-control-http-traffic
# * https://forums.plex.tv/index.php/topic/39823-howto-limit-plex-media-server-bandwidth-on-linux/?p=466013
@Dirrk
Dirrk / plex-dashboard.xml
Created January 25, 2016 05:34
splunk dashboard for plex
<dashboard>
<label>plex-dashboard</label>
<row>
<panel>
<chart>
<title>Plex memory usage last hour</title>
<search>
<query>index="os" source=ps COMMAND=Plex | rex field=ARGS ".*?-i_.*\/data\/store.*\/(?&lt;t_file&gt;.*?)_-(?:filter|map_inline|map_[\d])" | rex field=ARGS "Plug.*\/(?&lt;plugin_name&gt;.*)$" | eval memMB=mem_used/1048576 | eval name=if(ARGS LIKE "New_Transcoder%",t_file,if(ARGS LIKE "Plug-in%", plugin_name, ARGS)) | timechart avg(memMB) by name</query>
<earliest>rt-1h</earliest>
<latest>rt</latest>
npm install
rm -rf build
mkdir -p build/src
rsync -av . build/src --exclude .git --exclude scripts
cp -R scripts/ build/
cd build
mv src/appspec.yml ./appspec.yml