Skip to content

Instantly share code, notes, and snippets.

View cameronmaske's full-sized avatar

Cameron Maske cameronmaske

View GitHub Profile
@caike
caike / todo.jsx
Created April 11, 2015 13:02
Simple Todo app demo using React + ES6
var React = require("react");
var allItems = []
allItems.push("Buy ingredients for Crock Pot");
allItems.push("Pick up chair at IKEA");
allItems.push("Go see mom");
class TodoList extends React.Component {
constructor(props){
super(props);
@popsikle
popsikle / cloud-service.yaml
Created March 6, 2015 00:17
CoreOS Baremetal cluster cloud configs, worker and service nodes
#cloud-config
hostname: <%= shortname %>
ssh_authorized_keys:
- ssh-rsa xxxx rsa-key-20120604
coreos:
units:
- name: settimezone.service
command: start
@kirkbushell
kirkbushell / interceptor.js
Created June 11, 2014 15:27
Angular JS HTTP response interceptor
/**
* Interceptor
* Implements functionality to catch various requests and fire events when they happen. This is generally to ensure
* that responses from the server are handled in a uniform fashion across the application. Also, by firing events
* it allows to have any number of handlers attach to the response.
*
* @author Kirk Bushell
* @date 28th March 2013
*/
var module = angular.module('core.interceptor', []);

NPM = {rubygems + gembundler}

Npm is the node package manager and it is a repository of packages that can be downloaded and incorporated into your application. Using the npm command-line tool you can install these packages on your system and specifically for your project. Just like gem install ... Npm has learned from some of the pain points in other package management systems and has made an improvement to how code modules are managed. If you live in the ruby world you may be familiar with gem and bundler, npm represents the merger of both of these tools.

The way I like to think of rubygems is an application registry of ruby open source and I think of bundler as a project manifest that describes all of your dependencies in a particular project. NPM does both, it is an interface to a registry and it provides a manifest in the package.json file. All module installations are installed local to the project in the node_modules folder. And node looks in that folder when you ask node to `requir

@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@mmoulton
mmoulton / README.md
Last active November 7, 2020 18:19
Docker Container Stats Collection Using Collectd

Docker stats collection for collectd

This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec plugin.

This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.

Usage

This script is intented to be executed by collectd on a host with running docker containers. To use, simply configure the exec plugin in collectd to execute the collectd-docker.sh script. You may need to adjust the script to match your particulars, such as the mount location for cgroup.

@benbalter
benbalter / geojson-conversion.sh
Last active April 23, 2024 13:16
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
Vagrant.configure("2") do |config|
# Use Ubuntu 12.04 64-bit for now.
config.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
# Provision the VM
config.vm.provision :shell, :path => "vagrant_data/install.sh"
# Configure network
config.vm.network :private_network, ip: "192.168.50.4"
@defunctzombie
defunctzombie / browser.md
Last active April 10, 2024 17:45
browser field spec for package.json