Skip to content

Instantly share code, notes, and snippets.

@codesplicer
codesplicer / init.pp
Last active Aug 29, 2015
puppet4 user->group->user bug
View init.pp
group { 'hal':
gid => 2001,
}
user { 'hal':
comment => 'what are you doing Dave?',
uid => 2000,
gid => 2001,
home => '/home/hal',
}
@codesplicer
codesplicer / template.json
Created Dec 17, 2014
Packer Ansible Template
View template.json
{
"builders": [
{
"access_key": "REDACTED",
"ami_description": "MYCOMPONENT v16",
"ami_name": "MYCOMPONENT-16-201412171508",
"command_wrapper": "sudo {{.Command}}",
"region": "eu-west-1",
"secret_key": "REDACTED",
"source_ami": "REDACTED",
View keybase.md

Keybase proof

I hereby claim:

  • I am codesplicer on github.
  • I am vik (https://keybase.io/vik) on keybase.
  • I have a public key whose fingerprint is 98CF FDDD F8F1 DE0C 2271 A28C 67D2 1E2C 3FE1 5FD6

To claim this, I am signing this object:

@codesplicer
codesplicer / app.py
Created Nov 9, 2012
flask-mongoengine in a blueprint
View app.py
# Flask related imports
from flask import Flask, render_template, jsonify, abort, request, make_response, session, redirect, url_for
# Flask extensions
from flask.ext.mongoengine import MongoEngine
from flask_debugtoolbar import DebugToolbarExtension
# Flask blueprints
import companies
from companies.views import companies
View test.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@codesplicer
codesplicer / es.sh
Created Feb 25, 2012 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 11.04
View es.sh
cd ~
sudo apt-get install unzip
sudo apt-get install python-software-properties -y
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.6.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
@codesplicer
codesplicer / app.js
Created Aug 30, 2011
Streaming twitter API + socket.io
View app.js
// SETUP
// Get the required modules
var express = require("express"),
mustachio = require("mustachio"),
sys = require("sys"),
app = express.createServer();
// Configure the app
app.configure(function() {