Skip to content

Instantly share code, notes, and snippets.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
# sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java8-installer
# Set default using this: (or update-alternatives):
# sudo apt-get install oracle-java7-set-default
sudo update-alternatives --config java
@itainteasy
itainteasy / etc-salt-reactor
Created May 23, 2016 04:38 — forked from njpatel/etc-salt-reactor
Fun with salt, basically running scripts on master when events are fired via the Reactor system. The names of the files are paths with - replacing /
<contents of normal file>
# Add any additional locations to look for master runners
runner_dirs: [/srv/runners]
# Register a reactor whenever a cloud provider emits 'created'
# the * is the name of the VM, we want any, but you could
# do something like salt/cloud/Webservers-*/created if you only
# wanted your webservers
reactor:
@itainteasy
itainteasy / gist:390d394895456437df9829bf973e053e
Created May 23, 2016 04:34 — forked from ollin/gist:5135226
saltstack - vagrant/init.sls - working example - using vagrant 1.0.6 i686 deb package
vagrant:
pkg.installed:
- sources:
- 'vagrant': 'http://files.vagrantup.com/packages/476b19a9e5f499b5d0b9d4aba5c0b16ebe434311/vagrant_i686.deb'
newrelic-add-repo:
cmd.run:
- name: echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
- unless: grep "deb http://apt.newrelic.com/debian/ newrelic non-free" /etc/apt/sources.list.d/newrelic.list
newrelic-trust-repo:
cmd.run:
- name: wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
- unless: apt-key list | grep "New Relic"
build_deps:
pkg.installed:
- pkgs:
- git
- createrepo
- rpm-build
- gcc
- gcc-c++
- python-virtualenv
- python-devel
dockerfile/elasticsearch:
docker.pulled:
- name: dockerfile/elasticsearch
- require_in: elasticsearch-container
elasticsearch-container:
docker.installed:
- name: elasticsearch
- hostname: elasticsearch
- image: dockerfile/elasticsearch
@itainteasy
itainteasy / salt.sls
Created May 23, 2016 04:28 — forked from arubis/salt.sls
salt.sls
salt-minion:
pkgrepo.managed:
- ppa: saltstack/salt
pkg.latest:
- name: salt-minion
- refresh: True
@itainteasy
itainteasy / top.sls
Created May 23, 2016 04:28 — forked from rgbkrk/top.sls
top.sls
base:
'*':
- python
- memcache
- nbviewer
- supervisor
- firewall
@itainteasy
itainteasy / steam.sls
Created May 23, 2016 04:27 — forked from garbast/steam.sls
Install steam via saltstack
dpkg_steam_license:
cmd.run:
- unless: which steam
- name: '/bin/echo /usr/bin/debconf steam/license note | /usr/bin/debconf-set-selections'
- require_in:
- pkg: steam
- cmd: dpkg_steam_question
dpkg_steam_question:
cmd.run:
@itainteasy
itainteasy / 0_reuse_code.js
Created April 30, 2016 09:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console