Skip to content

Instantly share code, notes, and snippets.

@garbast
garbast / steam.sls
Created October 17, 2015 14:06
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:
@bunchc
bunchc / Vagrantfile
Created April 28, 2015 20:06
Multi-Node Salt Minions & Master
# -*- mode: ruby -*-
# vi: set ft=ruby :
# If container_sync
# enable swift2
# configure swift and swift2 with container_sync configs (execute extra script at end)
# If dvr
# enable compute2
# configure compute and compute2 for dvr
@windytan
windytan / emoji.pl
Last active August 14, 2023 14:50
Visualize SSH public key fingerprints using Unicode emoji
# Oona Räisänen 2013
# http://windytan.com
# ssh-keygen -l -f ~/.ssh/id_rsa.pub | perl emoji.pl
@emoji = qw( 🌀 🌂 🌅 🌈 🌙 🌞 🌟 🌠 🌰 🌱 🌲 🌳 🌴 🌵 🌷 🌸
🌹 🌺 🌻 🌼 🌽 🌾 🌿 🍀 🍁 🍂 🍃 🍄 🍅 🍆 🍇 🍈
🍉 🍊 🍋 🍌 🍍 🍎 🍏 🍐 🍑 🍒 🍓 🍔 🍕 🍖 🍗 🍘
🍜 🍝 🍞 🍟 🍠 🍡 🍢 🍣 🍤 🍥 🍦 🍧 🍨 🍩 🍪 🍫
🍬 🍭 🍮 🍯 🍰 🍱 🍲 🍳 🍴 🍵 🍶 🍷 🍸 🍹 🍺 🍻
@pyKun
pyKun / centos.ustack
Last active February 10, 2022 18:53
Worked kickstart file for a standard centos
# centos_minimal_livecd.ks
# Created by AndrewSerk
part / --size 8192 --fstype ext4
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
@DazWorrall
DazWorrall / test_salt.py
Last active December 14, 2015 13:09
Apply a salt state to the current machine using the internal api
import salt.config
opts = salt.config.minion_config('/tmp/foo') # Doesnt need to be present
opts['file_client'] = 'local' # I dont know if this is right. Not 'remote'
opts['cachedir'] = '/tmp/salt' # Needs to be writeable
d = {
'/tmp/bacon': {
'file': [
'directory',
@unicolet
unicolet / linuxservers.db
Created October 31, 2012 14:50
Generate a dns zone definition from Salt
@ in soa localhost. root 1 3H 15M 1W 1D
ns localhost.
{% set nets=salt['publish.publish']('*','network.interfaces') %}{% for n in nets %}{% set pdata=salt['publish.publish'](n,'pillar.data') %}{% if pdata.has_key(n) %}{% if pdata[n].has_key('zone') %}{% if pdata[n]['zone']=='linuxservers' %}
{{ n }} IN A {{ nets[n]['eth0']['inet'][0]['address'] }}
{% endif %}{% endif %}{% endif %}{% endfor %}
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: