Skip to content

Instantly share code, notes, and snippets.

View fourjuaneight's full-sized avatar
🤖

Juan Villela fourjuaneight

🤖
View GitHub Profile
@viticci
viticci / Combine 3.py
Created November 18, 2014 14:37
Combine 3.py
import Image
import photos
import console
import ImageOps
# Pick screenshots to combine
screenshot1 = photos.pick_image(show_albums=True)
screenshot2 = photos.pick_image(show_albums=True)
screenshot3 = photos.pick_image(show_albums=True)
@carloscabanero
carloscabanero / IBMPlexMono.css
Last active December 8, 2017 19:04
IBMPlex
@font-face {
font-family: "ibm-plex-mono";
font-style: normal;
font-weight: 400;
src: url(data:font/ttf;charset-utf-8;base64,AAEAAAASAQAABAAgRFNJRwAAAAEAAVsIAAAACEdERUYYthiZAAFNGAAAAIJHUE9TPbJ4ZQABTZwAAAToR1NVQt9ERhUAAVKEAAAIhE9TLzKH8WZmAAABqAAAAGBjbWFwrpljkQAADKQAAAieY3Z0IAJODk8AABhcAAAAPmZwZ20GWZw3AAAVRAAAAXNnYXNwABgAIQABTQgAAAAQZ2x5ZgFHeUYAAB3sAAETkGhlYWQLRWVwAAABLAAAADZoaGVhBYgC6QAAAWQAAAAkaG10eMlvp2QAAAIIAAAKnGxvY2Eav2EQAAAYnAAABVBtYXhwBN0DTwAAAYgAAAAgbmFtZS5FQhQAATF8AAAGWXBvc3TDi3HcAAE32AAAFTBwcmVw7506KgAAFrgAAAGiAAEAAAABAABGgo8CXw889QAJA+gAAAAA1VIehQAAAADVUgKh/vz/BQKIBF8AAAAJAAIAAAAAAAAAAQAABAH+7QAAAlj+/P78AogAAQAAAAAAAAAAAAAAAAAAAqcAAQAAAqcAywAiAGkABgABAAAAAAAKAAACAAIZAAMAAQADAlgBkAAFAAACigJYAAAASwKKAlgAAAFeADwBNQAAAgsFCQUAAAAAAKAAAG9QACB7AAAAAAAAAABJQk0gAEAAAPsCAwz/JAEsBAEBEyAAAZMAAAAAAgQCugAAACAAAwJYADIAAAAAAlgAAAJYAAACWABCAlgAPAJYAF8CWABUAlgAPAJYAEMCWABJAlgAQwJYADwCWABDAlgAYgJYAGoCWABdAlgAaQJYAFACWAA2AlgAYgJYAEICWABfAlgAPAJYAE0CWABDAlgAJwJYAFwCWABAAlgAHgJYAD0CWAA1AlgAVQJYAB8CWABYAlg
@wesbos
wesbos / some-text.html
Created April 5, 2019 13:32
cool headings
<h1>Cool text</h1>
@viticci
viticci / Selection.py
Created November 24, 2015 03:15
Selection.py
# coding: utf-8
import sys
import html2text
import clipboard
import webbrowser
webpage = clipboard.get()
text = sys.argv[1]
@trevorbernard
trevorbernard / docker-compose.yml
Created January 17, 2019 05:09 — forked from tzapu/docker-compose.yml
docker compose file for local server, plex, transmission, sonarr, radarr, ombi, netdata, nextcloud
version: '2.1'
services:
transmission:
container_name: transmission
image: dperson/transmission
restart: unless-stopped
depends_on:
- plex
network_mode: host
environment:
@rordi
rordi / hugo-prev-next-navigation-custom-section.order.md
Last active April 18, 2021 18:33
Previous / Next Navigation in Hugo with custom section order

Previous/Next navigation in Hugo with custom order based on param / attribute

This gist let's you return previous/next pages based on a frontmatter parameter in Hugo. In this exmaple, the frontmatter parameter is called position, where lower positions come first.

This prev / next navigation is looping: if there is no "next >" entry anymore, the first entry of the collection will be linked. Same for "< prev": if there is no previous element, the last element of the collection will be linked.

<div class="nav-prev-next">
    {{ $currentSection := (($.Site.GetPage "section" .Section).Pages.ByParam "position") }}
@steventroughtonsmith
steventroughtonsmith / main.m
Created March 24, 2016 08:08
Load Mach-O executable at runtime and execute its entry point
void callEntryPointOfImage(char *path, int argc, char **argv)
{
void *handle;
int (*binary_main)(int binary_argc, char **binary_argv);
char *error;
int err = 0;
printf("Loading %s\n", path);
handle = dlopen (path, RTLD_LAZY);

The Story of NPM and Yarn

In the beginning there was NPM, and for a time it was good. Packages went forth and multiplied. The New Gods proclaimed the great demon Dependency Management had been slain. But The Old Gods knew better, for they had seen much and knew that the demon can never be killed, only held at bay.

The Old Gods were ignored. In the folly of a young age grew an abundance of packages and with them grew the scourge of dependency. In the depths beneath the earth, in a place beyond memory, the great demon stirred.

The first sign something was wrong was non-deterministic package version mismatches. “This is fine!” The New Gods declared. “A temporary setback, nothing more! We can fix it.” And so they introduced shrinkwrap, a lamp to combat the growing darkness.

But it proved to be too little, too late, and dusk continued to fall. The New Gods suffered their first major defeat at the [Battle of Left-pad](https://www.theregister.co.uk/2016/03/23/npm_left_

@swyxio
swyxio / Gatsby-bootstrap-lifecycle.md
Last active April 1, 2022 11:19
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9

The problem

When a MobileSafari keyboard-receing input (e.g. an input[type=text]) receives focus in Safari, the system will try to verify whether there is ample room to bring up the soft keyboard without needing to scroll. The amount of wiggle room needed for Safari to consider available scroll height "ample" seems to increase with every major iOS release (surely to work around the very real problem of focus being granted to inputs that are subsequently oscured by the keyboard).

However, for "app-ey" web sites that carefully place each text input in a relatively fixed layout, this can be a maddening arms of scooching up my content more and more with each iOS release to avoid awkward jutters every time the keyboard is shown (example video here. In practice, it seems like the input's scrollHeight can only really be about the equivalent of 15vh before you're likely to get an automated scrolling whiplash from the soft keyboard, which isn't much