This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aptitude safe-upgrade --simulate --assume-yes | awk -F ' ' '/[0-9]+ packages upgraded/ {print $1}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$secret = 'SESAME' | |
exec {'read_secret_variable': | |
command => '/bin/echo $ENVSECRET > /tmp/secret', | |
environment => "ENVSECRET=$secret" | |
} | |
# $ cat /tmp/secret | |
# SESAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: logstash-forwarder | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@salt:~# salt --async '*' cmd.run 'date ; sleep 10; date' | |
Executed command with job ID: 20150716111845948627 | |
root@salt:~# salt --async '*' cmd.run 'date ; sleep 10; date' | |
Executed command with job ID: 20150716111847963330 | |
root@salt:~# salt-run jobs.lookup_jid 20150716111845948627 | |
debian7: | |
Thu Jul 16 11:18:45 AEST 2015 | |
Thu Jul 16 11:18:55 AEST 2015 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-AppxPackage | Select-String Zune | Remove-AppxPackage | |
Get-AppxPackage | Select-String Camera | Remove-AppxPackage | |
Get-AppxPackage | Select-String onenote | Remove-AppxPackage | |
Get-AppxPackage | Select-String phone | Remove-AppxPackage | |
Get-AppxPackage | Select-String photos | Remove-AppxPackage | |
Get-AppxPackage | Select-String BingSport | Remove-AppxPackage | |
Get-AppxPackage | Select-String Microsoft.People | Remove-AppxPackage | |
Get-AppxPackage | Select-String BingWeather | Remove-AppxPackage | |
Get-AppxPackage | Select-String WindowsSoundRecorder | Remove-AppxPackage | |
Get-AppxPackage | Select-String WindowsStore | Remove-AppxPackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -y update | |
apt-get -y install apt-transport-https ca-certificates | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' > /etc/apt/sources.list.d/docker.list | |
apt-get -y update | |
apt-get -y install docker-engine | |
service docker start | |
docker run hello-world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
import picamera | |
import subprocess | |
# Set up a pin on the GPIO connector for the "record" button. | |
# We'll use pin 18, which is here: | |
# | |
# ....X........ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove all containers, inluding those that are not running. | |
docker ps --quiet | xargs docker kill | |
docker ps --all --quiet | xargs docker rm | |
# Remove all images. | |
docker images --format '{{.ID}}' | xargs docker rmi --force | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oct 13, 2016 4:01:37 AM jnr.netdb.NativeProtocolsDB load | |
WARNING: Failed to load native protocols db | |
java.lang.UnsatisfiedLinkError: Symbol not found: Java_com_kenai_jffi_Foreign_dlerror | |
at jnr.ffi.provider.jffi.AsmRuntime.newUnsatisifiedLinkError(AsmRuntime.java:40) | |
at jnr.netdb.NativeProtocolsDB$LinuxLibProto$jnr$ffi$1.getprotobyname_r(Unknown Source) | |
at jnr.netdb.NativeProtocolsDB$LinuxNativeProtocolsDB.getProtocolByName(NativeProtocolsDB.java:176) | |
at jnr.netdb.NativeProtocolsDB.load(NativeProtocolsDB.java:80) | |
at jnr.netdb.NativeProtocolsDB.access$000(NativeProtocolsDB.java:40) | |
at jnr.netdb.NativeProtocolsDB$SingletonHolder.<clinit>(NativeProtocolsDB.java:47) | |
at jnr.netdb.NativeProtocolsDB.getInstance(NativeProtocolsDB.java:43) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin | |
choco install puppet-agent | |
puppet module install chocolatey/chocolatey |
OlderNewer