Skip to content

Instantly share code, notes, and snippets.

View lmayorga1980's full-sized avatar

lmayorga lmayorga1980

  • Spearfishing Co.
  • Bahamas
View GitHub Profile
@lmayorga1980
lmayorga1980 / gist:6048949
Last active December 20, 2015 01:29
Pushover notifications (Ruby/json)
#Sends push over notifications using a json file that contains the user-keys and tokens
class Pushover
def initialize
json = File.read("json/pushover.json")
@users = JSON.parse(json)['users']
@endpoint = "https://api.pushover.net/1/messages.json"
end
def send(message)
@lmayorga1980
lmayorga1980 / gist:8586761
Created January 23, 2014 21:04
packer-template
{
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/base.sh",
"scripts/vagrant.sh",
"scripts/virtualbox.sh",
"scripts/vmware.sh"
],
@lmayorga1980
lmayorga1980 / Rundeck-Commands4-Windows
Last active August 29, 2015 13:57
Rundeck with Remote Windows Machines and OpenSSH
/cygdrive/c/Progra~2/Puppet\ Labs/Puppet\ Enterprise/bin/facter.bat
/cygdrive/c/Progra~2/Puppet\ Labs/Puppet\ Enterprise/bin/facter.bat puppetversion
/cygdrive/c/Progra~2/Puppet\ Labs/Puppet\ Enterprise/bin/puppet.bat --version
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing/>
<settings pass="windowsPE">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
@lmayorga1980
lmayorga1980 / puppet.bat
Created August 22, 2014 02:59
Puppet Command Line
puppet apply -vd --modulepath=C:\Temp\modules --hiera_config=C:\vagrant\conf\hiera.yaml --fileserverconfig=C:\vagrant\conf\fileserver.conf --parser future C:\Temp\manifests\site.pp
@lmayorga1980
lmayorga1980 / puppet-untar-windows.pp
Created September 1, 2014 23:08
7zip uncompress a .tar.gz in one line
...
command => "cmd.exe /c 7z.exe x ${shared_drive}\\java\\${pkg}.tar.gz -so | 7z.exe x -aoa -si -ttar -o\"C:\\Program Files\\Java\" -y",
...
@lmayorga1980
lmayorga1980 / trusty-preseed
Last active August 29, 2015 14:06
Ubuntu-Trusty-Preseed
choose-mirror-bin mirror/http/proxy string
d-i base-installer/kernel/override-image string linux-server
d-i clock-setup/utc boolean true
d-i clock-setup/utc-auto boolean true
d-i finish-install/reboot_in_progress note
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string lvm
@lmayorga1980
lmayorga1980 / parallels-log
Created September 12, 2014 23:19
Issue with Parallels 9 and Packer 0.7.1
PACKER_LOG=debug packer build -only=parallels-iso win7sp1.json
2014/09/12 18:17:22 Packer Version: 0.7.1
2014/09/12 18:17:22 Packer Target OS/Arch: darwin amd64
2014/09/12 18:17:22 Built with Go Version: go1.3.1
2014/09/12 18:17:22 [DEBUG] Discoverd plugin: amazon-chroot = /usr/local/bin/packer-builder-amazon-chroot
2014/09/12 18:17:22 [DEBUG] Discoverd plugin: amazon-ebs = /usr/local/bin/packer-builder-amazon-ebs
2014/09/12 18:17:22 [DEBUG] Discoverd plugin: amazon-instance = /usr/local/bin/packer-builder-amazon-instance
2014/09/12 18:17:22 [DEBUG] Discoverd plugin: digitalocean = /usr/local/bin/packer-builder-digitalocean
2014/09/12 18:17:22 [DEBUG] Discoverd plugin: docker = /usr/local/bin/packer-builder-docker
2014/09/12 18:17:22 [DEBUG] Discoverd plugin: googlecompute = /usr/local/bin/packer-builder-googlecompute
@lmayorga1980
lmayorga1980 / lmayorga-terminal
Created September 18, 2014 05:06
My Terminal Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjMwNTg4MjM1MjkgMC4zMDU4ODIzNTI5IDAuMzA1ODgyMzUyOQAQAoAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
@lmayorga1980
lmayorga1980 / parallels-setup.log
Created September 23, 2014 16:43
parallels-tools-error
2014-09-23 11.04.53 :
2014-09-23 11.04.53 : --------------------------------------------
2014-09-23 11.04.53 : Started: 'C:\Windows\Temp\PrlToolsPackages\setup.exe' '--clearindication'
2014-09-23 11.04.53 : Detected: UserDefaultUILang 0x409, SystemDefaultLang 0x409
2014-09-23 11.04.53 : CLangBaseApp::GetSupportedLangID(): Language 1033 supported
2014-09-23 11.04.53 : CLangBaseApp::GetSupportedLangID(): Language 1033 supported
2014-09-23 11.04.53 : CLangBaseApp::SetLangID(): Set current language to 409(1033), en_US
2014-09-23 11.04.53 : Key 'Software\Parallels\Parallels Tools' open error 0x2.
2014-09-23 11.04.53 : IsUserAdmin()=1, IsIsaHal()=0, HadAcpiHal()=1, IsWinXP()=0 IsWin2003()=0
2014-09-23 11.04.53 : RemoveScheduleSelfRunOnce: failed to clean [prl_tools_setup_once.exe]