Skip to content

Instantly share code, notes, and snippets.

View SaintG12468's full-sized avatar
🎯
Focusing

Fabian St. George SaintG12468

🎯
Focusing
View GitHub Profile
@mparke
mparke / gulpfile.js
Created November 20, 2014 04:22
Example gulpfile.js
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var bump = require('gulp-bump');
var git = require('gulp-git');
var del = require('del');
var header = require('gulp-header');
var rename = require("gulp-rename");
var runSequence = require('run-sequence');
@eight04
eight04 / gist:4ce675452c2161fe3045
Created October 24, 2014 02:20
[Less] Finding GCD
.gcd(@v1, @v2) when (@v1 < @v2) {
.gcd(@v1, @v2 - @v1);
}
.gcd(@v1, @v2) when (@v1 > @v2) {
.gcd(@v1 - @v2, @v2);
}
.gcd(@v1, @v2) when (@v1 = @v2){
@return: @v1;
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var minifyCSS = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var please = require('gulp-pleeease');
var rename = require('gulp-rename');
@Eomerx
Eomerx / lessmixins.less
Created August 15, 2014 12:45
less mixins
//---------------------------------------------------
// LESS Prefixer
//---------------------------------------------------
//
// All of the CSS3 fun, none of the prefixes!
//
// As a rule, you can use the CSS properties you
// would expect just by adding a '.':
//
// box-shadow => .box-shadow(@args)
@andrewvaughan
andrewvaughan / photoshop.less
Created June 6, 2014 17:53
Less with Photoshop Mixins
// Use Less.js 1.3.2 or higher to compile.
.round-box(@tl: 9, @tr: 9, @br: 9, @bl: 9) {
@val: ~'@{tl}px' ~'@{tr}px' ~'@{br}px' ~'@{bl}px';
-moz-border-radius: @val;
-webkit-border-radius: @val;
-o-border-radius: @val;
-ms-border-radius: @val;
-khtml-border-radius: @val;
@keccers
keccers / less-loop.less
Last active November 15, 2016 20:09
LESS LOOP
.generate-nav(@n, @i: 1) when (@i =< @n) {
@percent: (@i*-100);
input[type=radio]#slide@{i}:checked ~ .slides {
margin-left: 0;
//.another-rule { needs-to-be: nested-in-here; }
}
.generate-nav(@n, (@i + 1));
}
.generate-nav(10);
@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
@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');
@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
})