Skip to content

Instantly share code, notes, and snippets.

View ifthenelse's full-sized avatar
🏎️
LIFE BE LIKE

Andrea Collet ifthenelse

🏎️
LIFE BE LIKE
View GitHub Profile
@mickdekkers
mickdekkers / snazzy.xml
Last active March 22, 2019 11:03
Sindre Sorhus' Snazzy theme ported to ConEmu -- see https://github.com/joonro/ConEmu-Color-Themes#how-to-install for installation instructions
<key name="Palette1" modified="2016-11-18 17:52:55" build="160710">
<value name="Name" type="string" data="Snazzy"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="00362a28"/>
<value name="TextColorIdx" type="hex" data="00ebf0ef"/>
<value name="BackColorIdx" type="hex" data="00362a28"/>
<value name="PopTextColorIdx" type="hex" data="00ebf0ef"/>
<value name="PopBackColorIdx" type="hex" data="00362a28"/>
<value name="ColorTable00" type="dword" data="00362a28"/>
<value name="ColorTable01" type="dword" data="00ffc757"/>
@eguven
eguven / brew-list.sh
Last active February 7, 2024 06:16
List all packages installed using Homebrew and their sizes
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@monkeymonk
monkeymonk / jquery.scrollToTop.js
Created April 8, 2016 08:26
ES6 jQuery plugin definition
import $ from 'jquery';
import plugin from './plugin';
class ScrollToTop {
constructor(element, options) {
const $element = $(element);
$(window).scroll(function () {
if ($(this).scrollTop() > options.offset) {
$element.fadeIn();
@runspired
runspired / .bash_profile
Last active February 6, 2023 14:56
Make Alfred / Spotlight ignore node_modules and bower_components
alias nom='npm cache clean && rm -rf node_modules && mkdir node_modules && touch node_modules/.metadata_never_index && npm install'
alias bom='bower cache clean && rm -rf bower_components && mkdir bower_components && touch bower_components/.metadata_never_index && bower install'
@leny
leny / .eslintrc.json
Last active February 27, 2024 08:25
ESLint config file for node.js + ES6 projects.
{
"env": {
"node": true,
"es6": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParameters": true,
@paulirish
paulirish / what-forces-layout.md
Last active May 6, 2024 07:54
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@rponte
rponte / get-latest-tag-on-git.sh
Last active March 11, 2024 07:50
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@benjasHu
benjasHu / jquery-plugin.js
Last active March 13, 2021 07:36
ES6 Module jQuery Plugin Definition
import pluginify from 'pluginify';
class Plugin {
constructor() {
/* ... */
}
}
/*
Convert plugin class into a jQuery plugin
@julianocomg
julianocomg / AffixWrapper.jsx
Last active November 28, 2022 14:59
A simple affix React component.
/**
* @author Juliano Castilho <julianocomg@gmail.com>
*/
var React = require('react');
var AffixWrapper = React.createClass({
/**
* @type {Object}
*/
propTypes: {