Skip to content

Instantly share code, notes, and snippets.

View jangeador's full-sized avatar
🐵

Delio Castillo jangeador

🐵
View GitHub Profile
#!/bin/bash
# Default Variable Declarations
DEFAULT="default.txt"
FILEEXT=".ovpn"
CRT=".crt"
KEY=".key"
CA="ca.crt"
TA="ta.key"
@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
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 / sconfig.bat
Created July 21, 2015 21:56
Configuration utility for Windows Server Core
REM Run this as admin to configure server
sconfig
@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 / 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 / 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 / boolean_as_icon.py
Created October 10, 2015 02:21
template tag to render boolean as a nice icon
from django import template
register = template.Library()
@register.filter()
def bool_me(value):
'''
Renders Boolean as a nice FontAwesome Icon.
:param value:
:return:
@jangeador
jangeador / disable_mailbox.ps1
Created October 28, 2015 20:28
Disable Mailbox for Active Directory Disabled Accounts
Get-Mailbox -resultsize unlimited | where { $_.ExchangeUserAccountControl -match 'AccountDisabled'} | disable-mailbox
@jangeador
jangeador / regex.txt
Created November 10, 2015 22:04
Sublime Text Filter for lines not containing
# Filter for all lines not containing the string ',KG,'
^((?!,KG,).)*$