Skip to content

Instantly share code, notes, and snippets.

View robdecker's full-sized avatar

Rob Decker robdecker

View GitHub Profile
@shadcn
shadcn / PANTHEON.md
Last active February 23, 2017 18:38
How to create a composer-based project on Pantheon.

How to create a composer-based project on Pantheon.

  1. Install Terminus: composer global require pantheon-systems/terminus.
  2. Head to your Pantheon dashboard, go to your Account and click on Machine Tokens.
  3. Create a new token and use it auth with Pantheon: terminus auth:login --machine-token=MACHINE-TOKEN
  4. Create a new site on Pantheon using terminus: terminus site:create name-of-site "Name of Site" 35b0e365-a191-4c70-adbe-9d02d01343f3. 35b0e365-a191-4c70-adbe-9d02d01343f3 is the uuid of the Drops 8 Composer upstream. You can see a list of upstream by running terminus upstream:list
  5. Once the site is created, you can head to http://dev-name-of-site.pantheonsite.io and continue with setup.
  6. Cloning your site on your local should give you a composer-based template.
@jherax
jherax / filterArray.js
Last active February 23, 2024 12:59
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@robdecker
robdecker / Gulpfile.js
Last active November 2, 2019 01:45
[Current Gulp setup] #gulp
'use strict';
// Include Gulp
var gulp = require('gulp'),
// Include Plug-ins
changed = require('gulp-changed'),
concat = require('gulp-concat'),
globbing = require('gulp-css-globbing'),
imagemin = require('gulp-imagemin'),
@cweagans
cweagans / Vagrantfile
Last active June 8, 2018 20:46
Vagrantfile
# Up to date version can always be found at https://gist.github.com/cweagans/4e879a72985905e145df
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.synced_folder ".", "/srv", type: "nfs"
config.vm.network "private_network", ip: "192.168.205.142"
config.vm.network "forwarded_port", guest: 80, host: 8085
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
@pixelwhip
pixelwhip / magic-padding.scss
Last active April 8, 2020 17:37
Magic Padding Sass Mixin. Adds padding to all four sides of an element. Replacing bottom padding with an :after psuedo element with top margin, giving the illusion of the bottom padding collapsing with the bottom margin of the last child within the element. @params $values Same as CSS shorthand for padding Example: 10px or 1em 10px or 10px 20px …
//
// @file
// Magic Padding mixins.
//
// Replaces bottom padding with an :after psuedo element with top margin, giving
// the illusion of the bottom padding collapsing with the bottom margin of the
// last child within the element.
//
// @param $value
@JohnAlbin
JohnAlbin / _init.scss
Last active December 26, 2015 18:09
Handing IE8 and lower with Breakpoint + compass/support
// Initialize the Sass variables and partials used in this project.
// Set the legacy IE support variables. We override the default values set by
// the compass/support partial, but let styles-ie8.scss override these values.
$legacy-support-for-ie6 : false !default;
$legacy-support-for-ie7 : false !default; // Note the use of !default.
$legacy-support-for-ie8 : false !default;
// Partials to be shared with all .scss files.
@pascalduez
pascalduez / template.php
Last active December 23, 2015 22:39
Drupal 7 — Add JS with conditional comments
<?php
/**
* Helper function to add IE commented js files.
* Offer more placement flexibility than drupal_add_html_head.
*/
function _add_ie_js(array $scripts) {
$return = '';
foreach ($scripts as $key => $value) {
@aschmoe
aschmoe / Gruntfile.js
Created September 16, 2013 19:08
Gruntfile for Drupal subtheme creation. Use as "grunt subtheme:mynewsubtheme:scss" Made for the theme associated with the flight install profile. https://drupal.org/project/flight
'use strict';
var path = require('path');
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
copy: {
main: {
files: [
{
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;