Skip to content

Instantly share code, notes, and snippets.

View zastrow's full-sized avatar
🦄
Making the Web a magical place

Philip Zastrow zastrow

🦄
Making the Web a magical place
View GitHub Profile
@zastrow
zastrow / 0_reuse_code.js
Created November 6, 2013 18:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mixin colour($val) {
color: $val;
}
@zastrow
zastrow / A-Pen-by-Philip-Zastrow.markdown
Created February 25, 2014 17:33
A Pen by Philip Zastrow.
@zastrow
zastrow / Inline Block.scss
Created March 10, 2014 20:48
Common Mixins
@mixin inline($val) {
display: inline-block;
vertical-align: $val;
.lt-ie8 & {
display: inline;
zoom: 1;
}
}
@zastrow
zastrow / gist:9623710
Created March 18, 2014 16:29
JSWarrior
jsWarrior.turn = function(warrior) {
var action = null;
if(!warrior.game_started){
jsWarrior.firstSquareReached(warrior);
}
if(warrior.check() == "diamond") {
action = warrior.collect;
}
@zastrow
zastrow / gist:94ee35f59f7d0fda2681
Created May 7, 2014 21:27
Sparkbox’s sb-media mixin with a max-width option.
@mixin sb-media($min, $max:"") {
@if $no-mq-support{
@if $min < $serve-to-nomq-max-width{
@content;
}
}
@else if $max != "" {
@media ( 'min-width:' + $min ) and ( 'max-width:' + $max ) {
@content;
}
@zastrow
zastrow / gist:6ccea07baa27ec97b53e
Last active January 18, 2019 13:38
Simple Acute Triangle Mixin
// Triangle
@mixin triangle($position:"bottom", $color:"#000", $size:"1em", $opposite_size:"") {
$top: 0; $right: 0; $bottom: 0; $left: 0;
@if ( $position == "top" or $position == "bottom" ) {
$right: ($size/2) solid transparent;
$left: ($size/2) solid transparent;
@if ( $opposite_size != "" ) { $size: $opposite_size; }
@if ( $position == "top" ) {
$top: $size solid $color;
$bottom: 0 none;
@zastrow
zastrow / gist:566cbff99fe1124ffda9
Created May 12, 2014 15:31
Mixin that puts position offset values on one line a la padding or margin
@mixin positions($top:"auto", $right:"auto", $bottom:"auto", $left:"auto",$unit:"") {
@if ( $top != "auto" and ( $unit == "" or $unit == "rem" ) ) {
top: $top * $base-font-multiplier * 16px;
top: $top * 1rem;
} @else if ( $unit != "" and $unit != "rem" ) {
top: #{$top}#{$unit};
} @else {
top: $top;
}
@if ( $right != "auto" and ( $unit == "" or $unit == "rem" ) ) {

Keybase proof

I hereby claim:

  • I am zastrow on github.
  • I am zastrow (https://keybase.io/zastrow) on keybase.
  • I have a public key whose fingerprint is 9DA5 5A8B 2833 6822 0E37 316F 7A80 FC53 7691 FA81

To claim this, I am signing this object:

@zastrow
zastrow / SassMeister-input-HTML.html
Created September 3, 2014 01:31
Generated by SassMeister.com.
<a href="#">Sass Color Links</a>