Skip to content

Instantly share code, notes, and snippets.

View pixeline's full-sized avatar
😄
Heaven, I'm in heaven, And my heart beats so that I can hardly speak !

Alexandre Plennevaux pixeline

😄
Heaven, I'm in heaven, And my heart beats so that I can hardly speak !
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active May 31, 2024 22:37
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
<?php
//ini_set('display_errors',1);
//error_reporting(E_ALL | E_WARNING);
function is_valid_url($url){
$url = filter_var($url, FILTER_SANITIZE_URL);
return filter_var($url, FILTER_VALIDATE_URL);
}
/* RUNTIME */
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
function postToMedium($data=array()) {
$user_id = "XXXX";
$accessToken = "XXXX";
@nucliweb
nucliweb / fortune-cowsay-lolcat.md
Last active April 3, 2022 01:22
fortune | cowsay | lolcat

fortune | cowsay | lolcat

Install Brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install fortune

brew search fortune
@zlorb
zlorb / linux_fun.md
Last active April 12, 2024 22:40 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Install figlet [3] via : sudo apt-get install figlet
  4. Make sure you have Ruby installed via : ruby -v
  5. Install the lolcat [2] via : gem gem install lolcat
  6. (option) Add to .bash_profile and/or .bashrc
@hollodotme
hollodotme / Install-nginx-with-http2-support.md
Created April 9, 2016 17:07
Install nginx with http2 support on ubuntu 14.04 LTS (Trusty)

How to install nginx (>= 1.9.5) with http2 support on Ubuntu 14.04 LTS (Trusty)

IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!

Remove old nginx

Remove old nginx incl. nginx-common:

apt-get autoremove --purge nginx nginx-common
@jeromecoupe
jeromecoupe / base_creative_meeting_plan.md
Last active May 10, 2016 14:11
Outline for the Creative Meeting introduction @ Base Design - May 11, 2016

Communicating design in a digital environment

Before getting into the matter, I wanted to set the stage. We are essentially going to talk about three things today.

  1. The context of digital design
  2. Problematic static design deliverables
  3. Design deliverables and the current digital workflow

The context: dealing with unknown unknowns

@gchtr
gchtr / Acf_Current_Tab.php
Last active January 25, 2017 17:10
WordPress + ACF: Keep the last edited tab selection when post refreshes
<?php
// Drop this into your functions.php
/**
* ACF: Keep the last edited tab selection when post refreshes.
*
* When a post containing ACF tabs is opened for edits, the currently selected tab
* will be saved in a transient. Upon save or refresh of the page, the last selected
* tab will be selected again, making it more convenient to work with ACF tabs.
@pixeline
pixeline / _sassy_link_underlines.md
Last active June 11, 2016 14:57 — forked from jimmynotjim/_sassy_link_underlines.md
Sassy Link Underlines
@pixeline
pixeline / siege-urls.php
Last active January 23, 2018 12:45
WP-siege: Generates list of all published URLs from a Wordpress site, for use with Siege.
<?php
/*
*
* WP-siege: Generates list of all published URLs from a Wordpress site, for use with Siege.
* Author: Alexandre Plennevaux alexandre@pixeline.be
*
*/
//path to a wp-load file
include( './wp-load.php' );