Skip to content

Instantly share code, notes, and snippets.

View kinow's full-sized avatar
💭
😬

Bruno P. Kinoshita kinow

💭
😬
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active May 8, 2025 05:49
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
@1000k
1000k / Pure CSS3 image gallery with Flexbox (responsive).markdown
Last active March 9, 2021 00:55
Pure CSS3 image gallery with Flexbox (responsive)
@non
non / answer.md
Last active February 28, 2025 11:46
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

@cmbaughman
cmbaughman / generate_requires_setuppy.py
Created April 7, 2015 14:59
Automatically generate setup.py install_requires and dependency_links from a requirements.txt file.
import os
import re
def which(program):
"""
Detect whether or not a program is installed.
Thanks to http://stackoverflow.com/a/377028/70191
"""
def is_exe(fpath):
return os.path.exists(fpath) and os.access(fpath, os.X_OK)
anonymous
anonymous / relnotes.py
Created March 14, 2015 17:43
Hadoop's relnotes.py adapted for Jena release notes
#!/usr/bin/python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@muschneider
muschneider / nlp-pt-ex.groovy
Last active August 29, 2015 14:15
OpenNLP Portugue Example
@Grapes([
@Grab('org.apache.opennlp:opennlp-tools:1.5.2-incubating'),
@GrabExclude('jwnl:jwnl')
])
import opennlp.tools.postag.*
import opennlp.tools.sentdetect.*
import opennlp.tools.tokenize.*
def texto = "Pense bem. Quem casa quer casa."
@sckott
sckott / ropensci_parallel.md
Last active March 21, 2016 17:03
example parallel workflow with an rOpenSci package

Example parallel workflow

In this example, we use the rgbif package to search for occurrence (lat/long) data for 1000 species

Install and load rgbif

install.packages("rgbif")
library("rgbif")

Bamboo Plan Dashing Widget

Dashing widget to display plan build details from your Bamboo instance.

Preview

Bamboo Dashing Widget

Installation

@kinow
kinow / gist:8936667
Created February 11, 2014 15:11
SchemaSpyCommand
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class SchemaSpyCommand extends Command {
/**
* The console command name.
@h4cc
h4cc / satis_install.sh
Last active February 13, 2024 16:39
Guide to install a satis server for composer. It can mirror packages and create a index for own packages.
# Install a Webserver
apt-get -y install apache2
# Target docroot to /home/satis/web/
# Install PHP5 CLI and needed programs.
apt-get -y install php5-cli php5-curl php5-json git wget
# Add a specifix user for our task
adduser satis