Skip to content

Instantly share code, notes, and snippets.

View SaintG12468's full-sized avatar
🎯
Focusing

Fabian St. George SaintG12468

🎯
Focusing
View GitHub Profile
@glennblock
glennblock / fork forced sync
Created March 4, 2012 19:27
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master
@mhawksey
mhawksey / gist:3007293
Created June 27, 2012 22:26
Turn Google Site pages into RSS feed
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@abhoopathy
abhoopathy / vcenter.less
Created July 25, 2012 18:33
Less mixin for v-centering
/* A less mixin for vertical centering
* Consider a parent div with { height: 70px, position: relative }
*
* Case 1: Text div with no height
* .textdiv {
* .v-center(70px, text) //where 70px is parent div height
* }
*
* Case 2: Div with it's own height (uses absolute positioning)
* .nontextdiv {
@mucsher
mucsher / the-loop.less
Created April 17, 2013 06:30
Loop in Less
@iterations: 30;
// helper class, will never show up in resulting css
// will be called as long the index is above 0
.loopingClass (@index) when (@index > 0) {
// create the actual css selector, example will result in
// .myclass_30, .myclass_28, .... , .myclass_1
(~".myclass_@{index}") {
// your resulting css
/*
http://designshack.net/articles/css/10-less-css-examples-you-should-steal-for-your-projects/
Mixin
*/
@base: #663333;
@complement1: spin(@base, 180);
@complement2: darken(spin(@base, 180), 5%);
@lighten1: lighten(@base, 15%);
@ScottPolhemus
ScottPolhemus / mixins.less
Last active August 12, 2018 20:17
A collection of LESS mixins.
//
// LESS Utility Mixins
// -------------------
// Fill the parent element
.fill(@spacing: 0) {
position: absolute;
top: @spacing; bottom: @spacing;
left: @spacing; right: @spacing;
}
@haoch
haoch / utility-mixins.less
Created September 30, 2013 12:35
LESS UTILITY MIXINS
// UTILITY MIXINS
// --------------------------------------------------
// Clearfix
// --------------------
// For clearing floats like a boss h5bp.com/q
.clearfix {
*zoom: 1;
&:before,
&:after {
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@mikaelbr
mikaelbr / gulpfile.js
Created January 14, 2014 20:24
Example gulpfile for complete set-up.
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var less = require('gulp-less');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var minifyCSS = require('gulp-minify-css');
var embedlr = require('gulp-embedlr');
@decadecity
decadecity / mixins.less
Last active November 15, 2016 19:30
Less mixins
// Helper functions used throughout the code base.
// The old IE versions can cause the browser to hang so commented out.
#gradient {
.linear(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
background-color: @color;
background-image: -webkit-gradient(linear, left top, left top, color-stop(0, @start), color-stop(1, @stop));
background-image: -webkit-linear-gradient(@start, @stop);
background-image: -ms-linear-gradient(top, @start, @stop);
//filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@start,@stop)); // IE6 & IE7