Skip to content

Instantly share code, notes, and snippets.

View jdlich's full-sized avatar

Jacob Lichner jdlich

View GitHub Profile
$(document).ready(function() {
Number.prototype.times = function(value) {
for (var i = 0; i < this; i++) {
value();
}
}
function wrapEveryFour(children) {
var groupsOfFour = Math.floor(children.length / 4) + 1;
<xsl:for-each select="$ALL_GROUPS">
<!-- <xsl:if test="count(channel) > 0"> -->
<div id="tab-section_{navblock/@ID}" class="fl-container fl-container-autoHeading">
<h3><xsl:value-of select="navblock/@name"/></h3>
<ul class="fl-list-menu fl-list-brief">
<xsl:for-each select="channel">
<li>
<xsl:if test="navblock/@name == 'Course Catalog'">
<a class="flc-screenNavigator-backButton" href="/students/courses">Course Catalog</a>
</xsl:if>
/*
Theme Variations
*/
@mixin theme($name) {
.up.sault-hair #portalPage {
#portalPageHeader {
/*
Theme Variations
*/
@mixin theme($name) {
.up.#{$name} #portalPage {
#portalPageHeader {
@each $width in 25, 33, 34, 40, 50, 60 {
.col-#{$width} {
$grid-columns: ($width / 100) * ($blueprint-liquid-grid-columns - $portal-sidebar-grid-columns);
@include column($grid-columns);
}
}
require 'rubygems'
require 'nokogiri'
TOMCAT = "apache-tomcat-6.0.29"
UPORTAL = "rel-3-2-patches"
SKIN = "uga"
Dir['/Users/Jacob/Code/tasks/uportal/*'].sort.each { |rakefile| load rakefile }
@jdlich
jdlich / gist:1098564
Created July 22, 2011 00:25
ruby one-liner to grab ip address
# os x (copies ip to clipboard)
ifconfig en1 | ruby -ne '$_.match(/inet\s((\d|\.)+)/) { print $1 }' | pbcopy
# ubuntu
# make sure you have xclip: apt-get install xclip
# (also make sure to paste with the middle mouse button...)
ifconfig eth0 | ruby -ne '$_.match(/inet\saddr:((\d|\.)+)/) { print $1 }' | xclip
# wrap it with a function in .bashrc (don't forget the semi-colon)
function ip { COMMAND; }
ifconfig en0 | ruby -ne 'print $_[/inet\s((\d|\.)+)/,1]'
function ip { ifconfig en0 | ruby -ne 'puts $_[/inet\s((\d|\.)+)/,1] if $_.match(/^\s+inet\s/)' | pbcopy; }
# ~/.bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi