Skip to content

Instantly share code, notes, and snippets.

View myoung34's full-sized avatar

myoung34 myoung34

View GitHub Profile
pi@raspberrypi ~ $ sudo su -
root@raspberrypi:~# git clone https://github.com/myoung34/bluetoothradio.git
root@raspberrypi:~# cd bluetoothradio
root@raspberrypi:~/bluetoothradio# cp bluetooth-server /etc/init.d
root@raspberrypi:~/bluetoothradio# chmod 755 /etc/init.d/bluetooth-server && chmod +x /etc/init.d/bluetooth-server
root@raspberrypi:~/bluetoothradio# update-rc.d bluetooth-server defaults
root@raspberrypi:~/bluetoothradio# reboot
resample-method = trivial ; ADD THIS LINE TO THE FILE!
Enable=Source,Sink,Media,Socket
Install r10k: sudo puppet module install zack/r10k
apply this puppet file (after modifying it)
class { 'r10k':
pe_ruby => false,
sources => {
'puppet' => {
'remote' => '/path/to/your/r10k/repo/with/a/Puppetfile',
'basedir' => "${::settings::confdir}/environments"
},
$EC2SettingsFile="C:\Program Files\Amazon\Ec2ConfigService\Settings\Config.xml"
$xml = [xml](get-content $EC2SettingsFile)
$xmlElement = $xml.get_DocumentElement()
$xmlElementToModify = $xmlElement.Plugins
foreach ($element in $xmlElementToModify.Plugin)
{
if ($element.name -eq "Ec2SetPassword")
{
$element.State="Enabled"
@myoung34
myoung34 / cft.json
Created September 7, 2016 19:33
barebone ECS CFT for ELB + ECS Taskdefinition/service
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "ECS task/service definition with ELB.",
"Parameters": {
"ECSCluster": {
"Type": "String",
"Description": "Name of an existing ECS Cluster to run the task and service on"
},
"SubnetId": {
"Type": "List<AWS::EC2::Subnet::Id>",
@myoung34
myoung34 / policy.hcl
Last active September 8, 2016 12:07
vault by tags
path "secret/salt/production/foo/sftp/*" {
policy = "read"
}
path "auth/token/lookup-self" {
policy = "read"
}
path "secret/salt/production/internal/webserver/*" {
policy = "read"
}
path "auth/token/lookup-self" {
policy = "read"
}
@myoung34
myoung34 / init.sh
Created October 11, 2016 18:27
terraform output
#!/usr/bin/env bash
set -e
init() {
file="$1"
LOCATION=`dirname $file | sed 's/^\.\///g'`
terraform remote config \
-backend=s3 \
-backend-config="bucket=${BUCKET}" \
Experimental feature failure! Please report a bug.
This is not an error. Your Terraform operation completed successfully.
Your real infrastructure is unaffected by this message.
While running, Terraform sometimes tests experimental features in the
background. These features cannot affect real state and never touch
real infrastructure. If the features work properly, you see nothing.
If the features fail, this message appears.