Skip to content

Instantly share code, notes, and snippets.

@iamgabeortiz
iamgabeortiz / git-loglive
Created April 24, 2014 16:59 — forked from tlberglund/git-loglive
GIT LogLive Bash Script
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done
@iamgabeortiz
iamgabeortiz / tumblr.rb
Created April 27, 2014 13:31 — forked from derek-watson/tumblr.rb
Import tumblr Posts into Jekyll
#!/usr/bin/env ruby
# Script to import tumblr posts into local markdown posts ready to be consumed by Jekyll.
# Inspired by New Bamboo's post http://blog.new-bamboo.co.uk/2009/2/20/migrating-from-mephisto-to-jekyll
# Supports post types: regular, quote, link, photo, video and audio
# Saves local copies of images
require 'rubygems'
require 'open-uri'
require 'nokogiri'
desc 'Generate tags page'
task :tags do
puts "Generating tags..."
require 'rubygems'
require 'jekyll'
include Jekyll::Filters
options = Jekyll.configuration({})
site = Jekyll::Site.new(options)
site.read_posts('')
puts 'Generating tag cloud...'
require 'rubygems'
require 'jekyll'
include Jekyll::Filters
options = Jekyll.configuration({})
site = Jekyll::Site.new(options)
site.read_posts('')
@iamgabeortiz
iamgabeortiz / external_links.js
Last active August 29, 2015 14:01
Open links external to your site in a new tab/window via jQuery.
@iamgabeortiz
iamgabeortiz / windows_server_backup_status.ps1
Last active August 29, 2015 14:01
A little PowerShell script to grab the backup status from multiple servers and outputs them to a log file.
<#
----------------------------------------------------------------------------------
Caveats
-Assumes you have Windows Server Backup Command Line components already installed
on the server you are connecting to.
#>
# Start logging
If ($Host.Name -ne "Windows PowerShell ISE Host") {
$timestamp = Get-Date -Format yyyyMMddHHmmmss
@iamgabeortiz
iamgabeortiz / create-mit-license-org.ps1
Last active August 29, 2015 14:01
If you need to create an MIT-License.org entry from Windows PowerShell, then here you go.
# --------------------------------------------------------------------------------
# Requires: Windows PowerShell v2.0
$url = "http://username.mit-license.org"
$string = '{"copyright": "Your Name, http://your_domain","url": `
"http://your_domain","email": "your_email","format":"html"}'
$wc = new-object System.Net.WebClient
$wc.Encoding = [System.Text.Encoding]::ASCII
$wc.UploadString($url, $string)
<#
@iamgabeortiz
iamgabeortiz / marked-to-property.py
Last active August 29, 2015 14:01
Set a Property from a Marked Elements Underlying Column Data
## -------------------------------------------------------------------------------
## IronPython and SpotFire ##
from Spotfire.Dxp.Data import IndexSet
from Spotfire.Dxp.Data import RowSelection
from Spotfire.Dxp.Data import DataValueCursor
#Return selected value from table
def getSelection(dataTable,markingName,columnName):
values=DataValueCursoe.CreateFormatted(dataTable.Coumns[columnName])
selection=Document.Data.Markings[markingName].GetSelection(dataTable)
@iamgabeortiz
iamgabeortiz / my-boxstarter-script.txt
Last active August 29, 2015 14:02
My Default Development Boxstarter Script
## Boxstarter Settings
## http://bit.ly/boxstarternrurl?http://bit.ly/myboxstarterscript
## http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/iamgabeortiz/f43a071049f31542f2fb/raw/my-boxstarter-script.txt
Update-ExecutionPolicy Unrestricted
## Default Windows Settings
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Enable-RemoteDesktop
Set-TaskbarOptions -Size Small -Lock -Dock Bottom