Skip to content

Instantly share code, notes, and snippets.

View 4aficiona2's full-sized avatar
🖤

Michael Zumstein 4aficiona2

🖤
View GitHub Profile
@4aficiona2
4aficiona2 / resample-psi.sh
Created July 28, 2016 16:05
Resample specified images to 72 DPI
#!/bin/bash
if [[ ! "$1" || "$1" == "-h" || "$1" == "--help" ]]; then cat <<HELP
adapted from https://gist.github.com/rraallvv/d5336521a9dbe97123c6
Resample specified images to 72 DPI
http://benalman.com/
Usage: $(basename "$0") [img [img ...]]
The new MacBook Pro retina display is amazing, but screengrabs taken on
@4aficiona2
4aficiona2 / menu--main.html.twig
Last active February 8, 2023 21:38
Drupal 8 - Main menu twig template with adjustments for Yokai, base template was initialy classy theme
{#
/**
* @file
* Default theme implementation to display a menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
@4aficiona2
4aficiona2 / pantheon-scripts.sh
Last active December 15, 2015 13:50
Drush scripts invoked via Pantheon terminal terminus on Pantheon server
terminus drush en ds --site=bspv --env=dev
@4aficiona2
4aficiona2 / toggleAllDrupalPermissions
Created May 27, 2015 10:05
Drupal permissions - check all checkboxes for a certain role "/de/admin/people/permissions/?" if none are selected, otherwise they get inverted (disselected)
jQuery("#permissions")
.find("input.real-checkbox[type=checkbox]")
.click()
@4aficiona2
4aficiona2 / SassMeister-input-HTML.html
Created February 17, 2015 09:20
Generated by SassMeister.com.
<ul>
<li>
Equal<br/>height<br/>Test
</li>
<li>
Still not so equal
</li>
<li>
Test<br/>Test
</li>
@4aficiona2
4aficiona2 / Checkboxes-select-showcase-for-INFRAS.markdown
Created December 29, 2014 17:01
Checkboxes select showcase for INFRAS
@4aficiona2
4aficiona2 / webfontloader.js
Last active August 29, 2015 14:09
Web Font Loader v1.5.8
/* Web Font Loader v1.5.8 - (c) Adobe Systems, Google. License: Apache 2.0 */
;(function(window,document,undefined){var k=this;function m(a,b){var c=a.split("."),d=k;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function aa(a,b,c){return a.call.apply(a.bind,arguments)}
function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function n(a,b,c){n=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return n.apply(null,arguments)}var q=Date.now||function(){return+new Date};function s(a,b){this.K=a;this.v=b||a;this.F=this.v.document}s.prototype.createElement=function(a,b,c){a=this.F.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)&&("style"==d?a.style.cssText=b[d]:a.s
@4aficiona2
4aficiona2 / webfontloader-monotype-only.js
Last active August 29, 2015 14:09
Web Font Loader v1.5.8 - Monotype Build only
/* Web Font Loader v1.5.8 - Monotype Build only - (c) Adobe Systems, Google. License: Apache 2.0 */
;(function(window,document,undefined){var h=this;function l(a,b){var c=a.split("."),d=h;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function m(a,b,c){return a.call.apply(a.bind,arguments)}
function p(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function q(a,b,c){q=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?m:p;return q.apply(null,arguments)}var r=Date.now||function(){return+new Date};function s(a,b){this.B=a;this.A=b||a;this.v=this.A.document}s.prototype.createElement=function(a,b,c){a=this.v.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)&&("style"==d?a.styl
@4aficiona2
4aficiona2 / webfontloader_build.sh
Last active August 29, 2015 14:09
Webfont Loader rake command
# build a custom webfont loader
cd ~/Projects/yokai-playground/webfontloader/target;
rm webfont.js;
cd ..;
#rake compile['typekit'];
#rake compile['monotype'];
rake compile['google'];
@4aficiona2
4aficiona2 / package.json
Created October 29, 2014 10:35
Remove node_module .info files due to Drupal theme collision in post installation of 'npm install'
{
"scripts": {
"postinstall": "find node_modules -type f -name '*.info' | xargs rm;"
}
}