Skip to content

Instantly share code, notes, and snippets.

View willium's full-sized avatar
🧛

William Wolf willium

🧛
View GitHub Profile
@oncomouse
oncomouse / StyledTransition.js
Last active April 15, 2021 05:24
Using CSSTransitionGroup with Emotion.js
import React from 'react';
import styled from '@emotion/styled';
import { css } from '@emotion/core';
import { CSSTransition } from 'react-transition-group';
const has = (key, obj) => Object.prototype.hasOwnProperty.call(obj, key);
const keyframes = [
'appear',
'enter',
@camerondavison
camerondavison / .babelrc
Last active August 20, 2023 19:42
apache arrow from python to javascript
{
"presets": [
"@babel/preset-env",
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bearfrieze
bearfrieze / comprehensions.md
Last active December 23, 2023 22:49
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@alanhamlett
alanhamlett / requirements.txt
Last active March 21, 2019 00:02
WakaTime's requirements.txt Python dependencies
-e git://github.com/kennethreitz/inbox.py.git@551b4f44b144564504c687cebdb4c543cb8e9adf#egg=inbox
alembic==0.8.3
amqp==1.4.9
anyjson==0.3.3
boto==2.39.0
braintree==3.20.0
cairosvg==1.0.19
celery==3.1.20
@paulirish
paulirish / what-forces-layout.md
Last active July 16, 2024 16:33
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
@paulirish
paulirish / bling.js
Last active July 3, 2024 20:45
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@geekhunger
geekhunger / page.hbs
Created January 26, 2015 11:14
Ghost - List of posts inside post.hbs and page.hbs
...
{{> posts_list}}
...
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@alextucker
alextucker / README.md
Last active March 12, 2021 13:21
Installing Dokku and Deploying a Django App