Skip to content

Instantly share code, notes, and snippets.

View jangeador's full-sized avatar
🐵

Delio Castillo jangeador

🐵
View GitHub Profile
@jangeador
jangeador / install.sh
Last active September 22, 2015 03:34 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@jangeador
jangeador / change_db_owner.sh
Last active August 29, 2015 14:27 — forked from gingerlime/change_db_owner.sh
Postgresql - Changing ownership on all tables
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto
@jangeador
jangeador / move_stale_computer_accounts.bat
Created August 6, 2015 15:23
Move all stale active directory accounts to a new OU
REM Move all stale computer accounts (not active in 26 weeks) to the designated OU
for /f "Tokens=*" %s in ('DSQUERY computer "ou=GESD32,dc=GESD32,dc=AZ,dc=US" -inactive 26 -limit 0') do DSMOVE %s -newparent "ou=Computers,ou=Stale_Accounts,DC=GESD32,DC=AZ,DC=US"
@jangeador
jangeador / sconfig.bat
Created July 21, 2015 21:56
Configuration utility for Windows Server Core
REM Run this as admin to configure server
sconfig
Sub Reset_all_lastcells()
'David McRitchie, http://www.mvps.org/dmcritchie/excel/lastcell.htm
Dim sh As Worksheet, x As Long
For Each sh In ActiveWorkbook.Worksheets
x = sh.UsedRange.Rows.Count 'see J-Walkenbach tip 73
Next sh
End Sub
@jangeador
jangeador / baja_guia.sh
Last active August 29, 2015 14:21
Bajar la Guia del proyecto TVGuia para OpenElec
#!/bin/bash
# creado 5/19/15 por eljohnsmith para proyecto TVGuia
# Enlace a Dropbox Folder. Hay que asegurar que el final dice "dl=1" en vez de "dl=0"
dropboxlink=https://www.dropbox.com/sh/1bwe0nfpc92lmqb/AAAy0B2CxS56-74kZGAjore0a?dl=1
filedate=$(date +%Y%m%d)
tvguia=~/tvguia
downloads=~/downloads
#!/bin/bash
# Default Variable Declarations
DEFAULT="default.txt"
FILEEXT=".ovpn"
CRT=".crt"
KEY=".key"
CA="ca.crt"
TA="ta.key"
@jangeador
jangeador / temperature.cpp
Created January 12, 2015 15:11
Temperature Converter (From my early college days!)
/* Delio Castillo
BIS 221 C++
Charles Godfrey, Instructor
Spring 2002
Project Name : Project03A
Purpose of Program
To convert temperatures from Celsius to
@jangeador
jangeador / fabfile_gist.py
Created November 4, 2014 18:31
A script to backup several switches at once
from fabric.api import run, env, settings
extreme_switches = {'172.31.100.21': 'RDSL-S042-DCore-1',
'172.31.100.22': 'RDSL-S042-DCore-2',
'172.31.100.41': 'GES-S042',
'172.31.100.61': 'DSDS-S042',
'172.31.100.81': 'DV-S042',
'172.31.100.101': 'SWJH-S042',
'172.31.100.121': 'EP-S042',
'172.31.100.141': 'AZD-S042',
@jangeador
jangeador / rules.bat
Created October 31, 2014 17:46
Firewall Rules to Allow VEEAM to backup a Hyper-V Host
REM Rules are from here: http://www.veeam.com/kb1518
REM On Hyper-V Host Server open these ports
netsh advfirewall firewall add rule name="VEEAM Backup and Replication TCP" dir=in action=allow protocol=TCP localport=135,137-139,445
netsh advfirewall firewall add rule name="VEEAM Backup and Replication UDP" dir=in action=allow protocol=UDP localport=135,137-139,445
netsh advfirewall firewall add rule name="VEEAM Installer Service" dir=in action=allow protocol=TCP localport=6160
netsh advfirewall firewall add rule name="VEEAM Backup Proxy Service" dir=in action=allow protocol=TCP localport=6162
netsh advfirewall firewall add rule name="VEEAM vPower NFS Service" dir=in action=allow protocol=TCP localport=6161
netsh advfirewall firewall add rule name="VEEAM vPower NFS Service" dir=in action=allow protocol=TCP localport=6161
netsh advfirewall firewall add rule name="VEEAM Standard NFS Ports TCP" dir=in action=allow protocol=TCP localport=111,2049-2059,1058-1068
netsh advfirewall firewall add rule name="VEEAM Stand