Skip to content

Instantly share code, notes, and snippets.

View joetemp's full-sized avatar
🏆
Leveling up

Joe joetemp

🏆
Leveling up
View GitHub Profile
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
@joetemp
joetemp / structure.html
Created May 27, 2015 21:59
HTML5 Page Structure
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Your Website</title>
</head>
<body>
@joetemp
joetemp / blurTargets.js
Last active August 29, 2015 14:04
Blur targets
$(document).ready( function() {
// This is the proper way to use blur.js. Too bad it only works on one element...
$('.b1').blurjs({ // Area to be blurred.
source: '.b1', // Target photo.
radius: 15 // In THIS CASE... they happen to be the same for cleaner markup.
});
/**
@joetemp
joetemp / slider.js
Created July 19, 2014 21:42
Slider
// Global variable declarations
var i = 1;
var nudge = -50;
var bigNudge = -100;
var imgs = document.getElementsByTagName('img');
$( document ).ready(function(){
@joetemp
joetemp / Center Aspect
Last active August 29, 2015 14:01
A mixin that maintains aspect ratio and always stays centered. You simply feed it a width and an aspect ratio.
@mixin center_aspect($width, $aspect) {
width: $width;
$height: $width * $aspect;
height: $height;
max-height: 90%;
left: 50%;
top: 50%;
margin-left: - ($width / 2);
margin-top: - ($height / 2);
}