Skip to content

Instantly share code, notes, and snippets.

View byllc's full-sized avatar

Bill Chapman byllc

View GitHub Profile
#split the query data for each of hte query data records attached to this filter
def parse
or_match = /\s+or\s+/i
and_group = /\s+and\s+/i
not_group = /^\s*not\s+/i
quote_group = /"\w+"/i
or_pieces = []
query_values = []
or_split = query_string.split(or_match)
@byllc
byllc / diy-ngrok.md
Last active April 20, 2017 22:42 — forked from tekacs/show
This does something essentially equivalent to showoff.io if you have a publicly facing server...

This is basically diy ngrok

Usage: show

function show() {
    DOMAIN=".example.com"
    REMOTE="$2$DOMAIN"
    ssh -tR 1080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:1080 localhost"
}
The right side of my brain helps me make things rhyme
The left side keeps it all in time
Whats in between helps me learn and perceive
But do I Believe,
I have the answers I need?
Ours is a culture with pride in logic and reason
But do the ones and zeros truly have meaning
Does your software have feelings?
Stay Tuned
@byllc
byllc / bosh-release-job-control.md
Last active August 29, 2015 13:56
Question to ask when creating a bosh release.

BOSH Release Requirements Checklist

##Packaging

  • What packages are required?
  • Is there a usuable binary available?
  • Where is the source code located?
  • What are the compilation requirements on target platform?

##Job Creation

  • How to run process? eg. start, stop, restart.Control Script? Helpful wrapper script? ({name}_ctl)
@byllc
byllc / gist:8871383
Created February 7, 2014 20:40
Example Maria DB Config file (.my.cnf)
# Example mysql config file.
# You can copy this to one of:
# /etc/my.cnf to set global options,
# /mysql-data-dir/my.cnf to get server specific options or
# ~/my.cnf for user specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options
# This will be passed to all mysql clients
@byllc
byllc / RaspiNotes.md
Last active December 5, 2015 00:39
Some initial configurations for Headless Raspberry Pi

###IF you are using Raspian many of these tasks are unescessary. With Raspbian:

  • SSH is ready to go out of the box
  • default runlevel is 3
  • many items can be configured with raspi-config tool

###Adding more swap for high memory use concerns

  sudo dd if=/dev/zero of=/swap bs=1M count=1024
  sudo mkswap /swap
  sudo swapon /swap
@byllc
byllc / Bosh Notes.md
Last active August 29, 2015 13:56
Bosh Pitfalls and The experience of learning to create a bosh release.

Installing Bosh-lite for local development

  • Start Here S&W Talk on Bosh Lite
  • Then go Here Bosh Lite Github

Creating A Release

  • BOSH Release Recipe: I've started a list of questions you should answer before you begin a Bosh release: https://gist.github.com/byllc/8870959 Notice there is an example file in for MariaDB. It was helpful but by the time I was done with the release I noticed It was not thourough enough and I could had a lot more detail. I will go through and update the questions and answers. It would be nice to get this down to a point where you could just point bosh-gen at an answers file and it will supply these 'answers' to the scaffold.
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
Hello JSON
</body>
</html>
@byllc
byllc / Mesos Getting Started.md
Last active October 13, 2015 11:22
Apache Mesos Notes
@byllc
byllc / MesosTechnicalOverview.md
Last active August 29, 2015 13:57
Mesos Technical Overview

###Apache Mesos A cluster manager for high availabilty distributed applications. The main components of the Mesos arechitecture are master daemon that manages slave daemons running on each cluster node, and mesos applications (frameworks) that run on the slaves. The authors define Mesos as "A thin layer for resource sharing"

The master distributes resources (cpu, ram etc.) across applications by making them resource offers. The master uses an organizational policy to decide how many resources to allow a framework.

A framework running on top of Mesos consists a scheduler that registers with the master to be offered resources, and an executor process that is launched on slave nodes to run the framework’s tasks. When a frameworks accepts resources offered by the master it tells mesos what it would like to run with those resoureses and mesos launces the tasks on the slaves.

More about Executors