Skip to content

Instantly share code, notes, and snippets.

View rafegoldberg's full-sized avatar
🙃

Rafe Goldberg rafegoldberg

🙃
View GitHub Profile
@chaddy81
chaddy81 / scss_grid.scss
Created January 28, 2016 19:40
SCSS Grid
$columns: 12 !default;
$gutter: 30px !default;
$max-width: 1170px;
.grid {
margin: 0px auto;
max-width: $max-width;
width: 100%;
}
@atk
atk / LICENSE.txt
Created June 29, 2011 13:46 — forked from 140bytes/LICENSE.txt
Date.parse polyfill (no timezone support)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <alexthkloss@web.de>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@nwgat
nwgat / mirrorto.lftp
Last active April 12, 2019 23:01
mirrorto.lftp
set sftp:auto-confirm "yes"
set sftp:connect-program "ssh -v -a -x -i D:\path\to\key"
open sftp://user:password@site:port
mirror -R --verbose --use-pget-n=8 -c /cygdrive/driveletter/folder /remote/path;

Stylebot Patterns

stylebot.me has been down for a while, so I create this gist to help those who need document on pattern settings.

Basic (default)

By default, Stylebot uses simple text strings to match styles to websites. Examples:

  • docs.google.com : Matches any URL with docs.google.com in it.
  • docs.google.com, spreadsheets.google.com : Matches any URL with docs.google.com or spreadsheets.google.com in it.

Advanced

Stylebot supports wildcards **, * and ,

@AndersSchmidtHansen
AndersSchmidtHansen / vue-bem.js
Last active March 23, 2020 17:00
Vue BEM Directive - A vue.js directive for automatic BEM class generation when creating components. A very rough example can be found here: https://jsfiddle.net/at1h1z1z/6/
/*
|--------------------------------------------------------------------------
| Vue BEM Directive
|--------------------------------------------------------------------------
|
| If you find yourself writing a lot of long, tedious CSS class names in
| order to be consistent with the BEM naming convention, then try this
| directive. It automagically does all the heavy lifting based on
| the component's name found in $options.name.
|
@mathiasbynens
mathiasbynens / toggleAttr() jQuery plugin
Created February 8, 2010 21:20
toggleAttr() jQuery plugin
/*!
* toggleAttr() jQuery plugin
* @link http://github.com/mathiasbynens/toggleAttr-jQuery-Plugin
* @description Used to toggle selected="selected", disabled="disabled", checked="checked" etc…
* @author Mathias Bynens <http://mathiasbynens.be/>
*/
jQuery.fn.toggleAttr = function(attr) {
return this.each(function() {
var $this = $(this);
$this.attr(attr) ? $this.removeAttr(attr) : $this.attr(attr, attr);
@jbelke
jbelke / setup.sh
Last active August 19, 2020 22:56 — forked from iainconnor/setup.sh
OSX Setup
# Get Sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Install Xcode first - https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
# Install Xcode command line tools.
xcode-select --install
@jlong
jlong / SassMeister-input.scss
Created February 1, 2014 22:53
Navigate a nested maps with map-fetch() in Sass
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
//
// map-fetch($map, $keys)
//
// An easy way to fetch a deep value in a multi-level map. Works much like
// map-get() except that you pass multiple keys as the second parameter to
@miku
miku / README.md
Last active July 14, 2022 17:21
git --track vs --set-upstream vs --set-upstream-to

README

Short excursion into git --track, --set-upstream and --set-upstream-to.

All examples use the aliases co for checkout and br for branch.

Setup:

$ git clone git@github.com:AKSW/OntoWiki.git

// Brightness math based on:
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx
$red-magic-number: 241;
$green-magic-number: 691;
$blue-magic-number: 68;
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number;
@function brightness($color) {
// Extract color components