Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Lopez Silvenga

View GitHub Profile
View unbreak-windows-update.reg
Windows Registry Editor Version 5.00
[
-HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate
]
@Silvenga
Silvenga / add-minion.sh
Created Mar 21, 2016
Remotely Authorize and Provision a Salt Minion
View add-minion.sh
#!/bin/bash
# apt-get install sshpass
# http://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html
BOOTSTRAP=/srv/minion-bootstrap.sh
LOG_LOCATION=/tmp/minion-bootstrap.log
TMP=/tmp/salt
if [[ -z "$1" ]] || [[ -z "$2" ]] ; then
View backup.sh
#!/bin/bash
export PASSPHRASE={{ grains['backup.password'] }}
export AWS_ACCESS_KEY_ID={{ grains['backup.aws_id'] }}
export AWS_SECRET_ACCESS_KEY={{ grains['backup.aws_key'] }}
FOLDER={{ grains['id'] }}
TARGET=s3+http://{{ grains['backup.aws_bucket'] }}/$FOLDER
SOURCE=/
LOGLOC=/var/log/nightly-backup
View saltpad.sls
#
# Mark Lopez (Silvenga) <m@silvenga.com>
# https://silvenga.com
#
{% set requirements = ['jinja2', 'flask', 'flask-wtf', 'requests', 'pymongo', 'werkzeug==0.9.4', 'cherrypy'] %}
{% set install_path = '/opt/saltpad' %}
{% set git_rev = 'f62809f6a854b9e9d49bd1534b09b7943abec354' %}
{% set api_url = 'https://YOURSALTMASTER.net' %}
{% set secret_key = '' %}
View slight-putty-theme.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Slight]
"Colour0"="240,240,240"
"Colour1"="255,255,255"
"Colour2"="63,63,65"
"Colour3"="103,103,103"
"Colour4"="0,0,0"
"Colour5"="0,255,0"
"Colour6"="21,23,26"
View keybase.md

Keybase proof

I hereby claim:

  • I am silvenga on github.
  • I am silvenga (https://keybase.io/silvenga) on keybase.
  • I have a public key whose fingerprint is DC75 80D8 0D67 53DC F209 2A54 37F1 A037 FEF7 8709

To claim this, I am signing this object:

View demo.jquery.lazyiew.html
<!-- This is a jquery plugin - we need jquery > 2.1 -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Off load the animations to CSS so we can get hardware acceleration -->
<link rel="stylesheet" type="text/css" href="jquery.lazyView.min.css" />
<!-- The lazyView script -->
<script src="jquery.lazyView.min.js"></script>
<script>
$(document).ready(function() {
// Select the HTML portion to lazyView.
View mg-postfix.sh
#!/bin/bash
#########################################################
mgUSERNAME="MailGun Username"
mgPASSWORD="COMPLEX PASSWORD"
testEmail="user@example.com"
#########################################################
echo "Installing this agent may be dangerous, make sure this is the correct server!"
@Silvenga
Silvenga / speedtest.sh
Created May 2, 2014
Network speed testing script put together by aFriend from LowEndTalk.
View speedtest.sh
#!/bin/bash
echo "
###############################################################################
Download tests. Warning: downloads approx 100MB per site. Total approx 1.8GB
###############################################################################
"
function download_benchmark() {
#echo "Benchmarking download from $1 ($2)"
View singleton.java
package com.silvenga.singleton;
import java.util.Random;
public class RandomSingleton
// Basic interface for a Singleton
public static Random getInstance() {
// Return the instance of Random created in RandomContainer