Skip to content

Instantly share code, notes, and snippets.

Avatar

Casey Zumwalt zumwalt

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am zumwalt on github.
  • I am zumwalt (https://keybase.io/zumwalt) on keybase.
  • I have a public key ASDbV9vAwUtbaSGSUwbqOQPDYn4AC0MOW2mQUGZlIPAV5Ao

To claim this, I am signing this object:

@zumwalt
zumwalt / sanfrancisco-font.css
Last active Aug 26, 2016
San Francisco Web Font
View sanfrancisco-font.css
@font-face {
font-family: "San Francisco Text";
font-weight: 300;
src: url("../fonts/sanfranciscotext-light-webfont.woff");
}
@font-face {
font-family: "San Francisco Text";
font-weight: 400;
src: url("../fonts/sanfranciscotext-regular-webfont.woff");
@zumwalt
zumwalt / Find
Created Aug 16, 2015
Regex for finding and replacing Compass includes in Sass
View Find
@include (.*?)\((.*?)\);
@zumwalt
zumwalt / .zshrc
Created Jul 25, 2015
Bash script to open a Python server on a specified port
View .zshrc
server() {
if [ -z "$1"]
then
python -m SimpleHTTPServer 8000
else
python -m SimpleHTTPServer $1
fi
}
@zumwalt
zumwalt / .zshrc
Created Jul 25, 2015
Find and kill a process using any port using a bash function
View .zshrc
killport() {
lsof -i TCP:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9
echo "Port" $1 "killed."
}
View rotated_text.scss
@mixin rotated-text($num-letters: 100, $angle-span: 180deg, $angle-offset: 0deg) {
$angle-per-char: $angle-span / $num-letters;
@for $i from 1 through $num-letters {
.char#{$i} {
@include transform(rotate($angle-offset + $angle-per-char * $i));
}
}
}
View Icon setup mixin
@mixin icon-setup($icon, $width, $height, $padding:"") {
padding-left: $width + 9;
position: relative;
&:before {
@include icon-sprite($icon);
content: '';
display: inline-block;
height: $height;
left: 5px;
position: absolute;
@zumwalt
zumwalt / Focus scroll
Created Jul 19, 2013
Keeps the window/body from scrolling while you're focused on a fixed/absolute element that also scrolls.
View Focus scroll
$('#element').bind('mousewheel DOMMouseScroll', function(e) {
var scrollTo = null;
if (e.type == 'mousewheel') {
scrollTo = (e.originalEvent.wheelDelta * -1);
}
else if (e.type == 'DOMMouseScroll') {
scrollTo = 40 * e.originalEvent.detail;
}
@zumwalt
zumwalt / calc() mixin for less
Last active Feb 2, 2017
calc() mixin for less
View calc() mixin for less
.calc(@expression) {
width: -moz-calc(@expression);
width: -o-calc(@expression);
width: -webkit-calc(@expression);
width: calc(@expression);
}
@zumwalt
zumwalt / Vagrantfile
Created Apr 9, 2013
Vagrantfile for vagrant-wordpress
View Vagrantfile
Vagrant::Config.run do |config|
config.vm.define :wpvm do |wp_config|
# Box
wp_config.vm.box = "precise32"
# Box URL
wp_config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# Access via IP.
You can’t perform that action at this time.