Skip to content

Instantly share code, notes, and snippets.

View ginader's full-sized avatar

Dirk Ginader ginader

View GitHub Profile
@function up-to($list, $index) {
$l: ();
@each $e in $list {
@if length($l) < $index {
$l: append($l, $e, list-separator($list));
}
}
@return $l;
}
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active April 28, 2025 16:43
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@rnalexander
rnalexander / gist:e3a5068c0f4a31de0534
Last active August 29, 2015 14:23
Miso Stew Recipe

Ingredients:

  • 1 250g(ish) block of furm tofu, cut into small cubes
  • 250g(ish) baby new potatoes, cut into 8ths
  • 100g(ish) cognichelli pasta (tiny shells, sometimes called soup pasta)
  • 1 medium onion, finely minced
  • 1/2 head of garlic, crushed and minced
  • Olive oil
  • Toasted Seasame Oil
  • 100-150g White miso paste (depends on taste)
  • 2-3 cubes vegan vegitable sock cubes (I use Knorr generally)
@saw
saw / gist:d826c410c6c7f75d27ba
Last active August 29, 2015 14:17
Switch iterm2 profile per host
# for this to work you need to create
# a profile for each host, or set of hosts or whatever.
# to make sure it is always current add this to your
# PROMPT_COMMAND so it runs every time, rather just at login.
if [ "$HOSTNAME" = "myhost1" ]; then
echo -ne "\033]50;SetProfile=myhost1\007"
fi
if [ "$HOSTNAME" = "myhost2" ]; then
@chrisrzhou
chrisrzhou / README.md
Last active October 19, 2017 09:32
D3 Sunburst Sequence

D3 Sunburst Sequence

bl.ocks.org link

D3 Sunburst Sequence visualizes a graph of nodes by highlighting sequential progression of nodes leading up to a final value. A sunburst sequence is useful to visualize relative weights/percentages of a starting state to an end state (e.g. webpage redirects, product retention, subscription-based products, cashflows).


Description

@kerryrodden
kerryrodden / README.md
Last active January 18, 2021 11:05
Zoomable sunburst with updating data

I combined Mike Bostock's Zoomable Sunburst and Sunburst Partition examples, so that I could have both zooming and updating the underlying data (between count and size, in this case). A simple combination of the examples does not work; you have to edit the arcTween function used for updating the data, so that when it redraws the partition layout, it takes account of the current zoom level by adjusting the domain of the x scale.

Click on any arc to zoom in, and click on the center circle to zoom out. Use the Size/Count radio buttons to update the data.

@gefangenimnetz
gefangenimnetz / materialDesignShadowHelper.less
Last active March 23, 2025 03:13
Less css box-shadow helper for cards & modals according to Googles Material Design spec.
/**
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality
*
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
*
* Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
*
* Example usage:
// how to install/first steps http://dalekjs.com/pages/getStarted.html#install
// how to use it within grunt: https://www.npmjs.org/package/grunt-dalek
module.exports = {
'Can access the DOM': function (test) {
test.open('http://dalekjs.com/')
// the execute method executes JavaScript within a browser & also has
// full access to the DOM
.execute(function (message) {
// the "data" method is a simple wrapper around a key/value store
@jeffjohnson9046
jeffjohnson9046 / percent-filter.js
Last active September 4, 2020 23:25
Format percentages in AngularJS
// In app.js or main.js or whatever:
// var myApp = angular.module('askchisne', ['ngSanitize', 'ngAnimate', 'ui.bootstrap', 'ui.bootstrap.tpls']);
// This filter makes the assumption that the input will be in decimal form (i.e. 17% is 0.17).
myApp.filter('percentage', ['$filter', function ($filter) {
return function (input, decimals) {
return $filter('number')(input * 100, decimals) + '%';
};
}]);
@LeaVerou
LeaVerou / gray.scss
Last active May 16, 2022 13:05
Polyfill gray() from CSS Color Level 4 with SASS
@function gray($intensity, $alpha: 1) {
@return rgba($intensity, $intensity, $intensity, $alpha);
}
/* Thanks Chris Eppstein for simplifying my code! */
/* Testing our new function */
body {
background: gray(50%);
background: gray(255, .2);