Skip to content

Instantly share code, notes, and snippets.

View jhanstra's full-sized avatar
🏔️

Jared Hanstra jhanstra

🏔️
View GitHub Profile
@jhanstra
jhanstra / gist:426c69bf8b3b97c6d054
Last active August 29, 2015 14:04
HTML for the empty state div. When a user has no favorites, this appears on the home page.
HTML:
<div class="row">
<div class="col-xs-6">
<div class="portlet-div empty-state">
<div class="portlet-content">
<div class="fake-apps-div">
<ul class="fake-app-list">
<li></li>
<li></li>
@jhanstra
jhanstra / gist:86501c361c7020c9b38d
Last active August 29, 2015 14:04
HTML and CSS for empty search results to be more helpful to users
HTML:
<div class="portlet-content">
<h2 class="center">No search results.</h2>
<div class="button-group-empty">
<div class="button-div">
<button class="btn btn-primary" id="btn-left">Browse all apps</button>
</div>
<div id="between-buttons">
<p class="center">or</p>
</div>
@jhanstra
jhanstra / gist:09ca8b54f0e564cb4101
Last active August 29, 2015 14:05
Notification icon
<h3><a class="header-text" href="new.html">My UW</a>
<!--<a href="#"><span class="no-nots">0</span></a>-->
<a href="#"><span class="number-of-nots">3</span></a>
<a href="#"><span class="glyphicon glyphicon-th-large app-drawer"></span></a></h3>
@cream: #F7F5E8;
.header-text {
color:@cream;
font-weight:200;
}
@jhanstra
jhanstra / gist:d982832630360352bc1d
Created October 2, 2014 19:05
Beta Sidebar in uPortal
<div class="beta-sidebar"><p>You are using a <b>beta version</b> of MyUW.<br /><a href="/portal/Login?profile=default">Take me to classic view.</a></p>
</div>
<script>
up.jQuery(document).ready(function() {
up.jQuery(window).scroll(function() {
if (up.jQuery(window).scrollTop() + up.jQuery(window).height() > up.jQuery(document).height()-125) { up.jQuery('.beta-sidebar').hide();}
if (up.jQuery(window).scrollTop() + up.jQuery(window).height() < up.jQuery(document).height()-125) { up.jQuery('.beta-sidebar').show(); }
});
});
@jhanstra
jhanstra / gist:bb2a24d88d8bb9f3721c
Last active August 29, 2015 14:08
directive test
app.directive('hideWhileLoading', ['$http' ,function ($http)
{
return {
restrict: 'A',
link: function (scope, elm, attrs)
{
scope.$watch(true, function(v)
{
elm.hide();
});
@jhanstra
jhanstra / gist:7b4266a4e6dc3c9667a4
Last active August 29, 2015 14:17
Professional Development code
HTML:
<!-- Professional Development Example -->
<li class="col-xs-12 col-sm-6 col-md-4 col-lg-3 no-padding list-container">
<div class="widget-content" id="portlet-id-{{::portlet.nodeId}}">
<div>
<div class="widget-title">
<h4>My Professional Development</h4>
</div>
<div class="widget-body">
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi
}
# Load ~/.extra, ~/.bash_prompt, ~/.exports, ~/.aliases and ~/.functions
# ~/.extra can be used for settings you don’t want to commit
for file in ~/.{extra,bash_prompt,exports,aliases,functions}; do
[ -r "$file" ] && source "$file"
done
unset file
export PATH=$PATH:bin
export PATH=$PATH:usr/local/bin
export PYTHONPATH=/usr/local/lib/python2.7/site-packages/
# Easier navigation: .., ..., ~ and -
alias ..="cd .."
alias cd..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# Handy things
@jhanstra
jhanstra / gist:599b2cd30c2e60dc1908
Created March 18, 2015 18:14
Sublime Preferences.sublime-settings
{
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"font_size": 14,
"ignored_packages":
[
"Vintage"
],
"sidebar_size_12": true,
"status_bar_brighter": true,
"tabs_medium": true,