Skip to content

Instantly share code, notes, and snippets.

View robdecker's full-sized avatar

Rob Decker robdecker

View GitHub Profile
@robdecker
robdecker / 1.md
Last active November 2, 2019 01:29
[Karabiner elements] #macos

Function keys tab

Target device: non internal keyboard

  • f5: to key f5
  • f6: to key f6

Complex modifications tab

@robdecker
robdecker / .scss
Last active November 2, 2019 01:41
[Bootstrap grid, using Susy & include-media] #bootstrap #sass
@import "susy";
@import "include-media";
$susy-columns: 12;
$susy-gutter-width: 15px;
$susy: (
columns: $susy-columns,
gutter-position: inside-static, // fixed-width width gutters
column-width: 120px,
@robdecker
robdecker / any.php
Last active November 2, 2019 01:44
[Link l() function with attributes] #d7
l(
t('<span></span>Link Title'),
'link_path',
array(
'attributes' => array(
'class' => array('menu-link'),
'id' =>'faq-page',
),
'html' => TRUE,
),
@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'),
@robdecker
robdecker / any.php
Last active November 2, 2019 01:46
[Theme an image via an image style] #d7
print theme('image_style', array( 'path' => $images[$i]['uri'], 'style_name' => 'photo-slideshow', 'attributes' => array('class' => 'img'.$i)));
@robdecker
robdecker / query.sql
Last active November 2, 2019 01:47
[Clear Drupal cache via SQL] #d7
SELECT
CONCAT('TRUNCATE TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ';') AS table_name
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = '{db_name}'
AND TABLE_NAME LIKE 'cache_%'
AND TABLE_TYPE = 'BASE TABLE'
@robdecker
robdecker / SassMeister-input.scss
Last active November 2, 2019 01:50
[Testing Breakpoint and no-query fallbacks] Generated by SassMeister.com. #sass
// ----
// Sass (v3.2.14)
// Compass (v0.12.3)
// Breakpoint (v2.0.7)
// ----
@import "breakpoint";
@import "compass";
// $breakpoint-no-queries: false;
/**
* Override or insert variables into the html template.
*
* @param $variables
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered. This is usually "html", but can
* also be "maintenance_page" since zen_preprocess_maintenance_page() calls
* this function to have consistent variables.
*/
@robdecker
robdecker / any.js
Last active November 2, 2019 01:51
[Run two actions at the same time, fadein() & animate()] From http://stackoverflow.com/questions/14138446/run-two-actions-at-the-same-time-fadein-animate #jquery
$('#div').css({'display':'block', 'opacity':'0'})
.animate({'opacity':'1','height':'300px'}, 1500);