Skip to content

Instantly share code, notes, and snippets.

View DawnPaladin's full-sized avatar

James Harris DawnPaladin

View GitHub Profile
#atom-perspective() {
@viewing-distance: 24in;
@rotation: 20deg;
.tree-view-scroller {
transform: translateY(-10vh) perspective(@viewing-distance) rotateY(@rotation);
padding-top: 12vh;
padding-bottom: 12vh;
transform-origin: left;
@DawnPaladin
DawnPaladin / gist:14e41444c9aaf303cfa8
Last active February 9, 2016 20:09
Convert an array of product numbers to an array of jQuery objects
var $ATCButtons = jQuery(itemNumbers.map(function(number) {
return '.addToCartBtn[widgetid="addToCart' + number + '"]';
}).join(','));
@DawnPaladin
DawnPaladin / hide-header.css
Created March 3, 2016 23:01
Trello monitoring board
/* Applies to URL: https://trello.com/mfwpriority/cards */
.tabbed-pane-header, .tabbed-pane-nav, .window-module.u-gutter {
display: none;
}
.header-notifications, .badge.is-unread-notification {
display: none;
}
@DawnPaladin
DawnPaladin / eslintrc.json
Last active April 18, 2016 16:02
Personal eslint config
{
"env": {
"browser": true,
"es6": false
},
"extends": "eslint:recommended",
"rules": {
"indent": [
1,
"tab"
@DawnPaladin
DawnPaladin / gulpfile.js
Created May 19, 2016 21:18
Gulpfile: Copy all files to another folder
var gulp = require('gulp');
gulp.task('default', function() {
gulp.src("**/*.*").pipe(gulp.dest("C:\\your\\target\\directory\\here\\"));
});
@DawnPaladin
DawnPaladin / gulpfile.js
Created May 20, 2016 19:16
Copy all except selected files to another folder
var gulp = require('gulp');
gulp.task('default', function() {
gulp.src(["**/*.*", "!node_modules/**/*.*"]).pipe(gulp.dest("C:\\your\\target\\directory\\here\\"));
});
@DawnPaladin
DawnPaladin / .stylelintrc
Created June 24, 2016 16:25
Simple stylelint config
{
"rules": {
"block-no-empty": true,
"color-no-invalid-hex": true,
"declaration-block-no-ignored-properties": true,
"declaration-block-trailing-semicolon": "always",
"indentation": "tab",
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"selector-type-no-unknown": true,
@DawnPaladin
DawnPaladin / js-reference.js
Created August 15, 2016 17:44
JavaScript reference guide
OBJECTS
=====
// There are two ways you can create objects: Literal notation and construction notation.
//
// Literal notation uses curly braces:
var james = {
job: "programmer",
married: false,
greet: function() {
console.log("Hello!");
@DawnPaladin
DawnPaladin / ImageMagick.txt
Created August 15, 2016 18:26
ImageMagick commands
This ImageMagick command takes all the .png files in a folder, resizes them to a maximum of 200x200px, and deposits them in the IM-processed folder:
mogrify -path IM-processed -resize 200x200 *.png
Note that the IM-processed folder must already exist.
To create a folder full of thumbnails:
mogrify -format gif -resize 125x125 -background transparent -gravity center -extent 125x125 -path thumbnails *t.*
dijit.byId('shippingOption').store.data