Skip to content

Instantly share code, notes, and snippets.

View mattlo's full-sized avatar
🎯
Focusing

Matt Lo mattlo

🎯
Focusing
View GitHub Profile
@pfig
pfig / mkfavicon.sh
Created February 12, 2012 12:01
Make a multi-resolution favicon.ico from a source image, using ImageMagick
#!/bin/bash
# from
# http://bergamini.org/computers/creating-favicon.ico-icon-files-with-imagemagick-convert.html
convert source-WxW.png -resize 256x256 -transparent white favicon-256.png
convert favicon-256.png -resize 16x16 favicon-16.png
convert favicon-256.png -resize 32x32 favicon-32.png
convert favicon-256.png -resize 64x64 favicon-64.png
convert favicon-256.png -resize 128x128 favicon-128.png
@SpainTrain
SpainTrain / circle.yml
Created September 21, 2015 17:26
CircleCI machine config for node-gyp with Node v4.X
machine:
node:
version: 4.1
pre:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install gcc-4.9 g++-4.9
post:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
@twolfson
twolfson / README.md
Last active June 7, 2022 23:45
Capturing retina screenshots on a non-retina device via Xvfb

We are bootstrapping a startup and don't own any retina devices to capture high resolution screenshots. Thankfully, this is possible via Xvfb.

Convenience Node.js script here: https://gist.github.com/twolfson/4f7e7ec7d6969173d6a095f86e2d47c8

Here's how to get started manually:

  • Launch an Xvfb instance with retina-scale DPI
    • Xvfb :99 -screen 0 3840x2160x24 -dpi 240
    • We'll be using :99 as our $DISPLAY but any unused value will do
    • Note that we are using 2x our expected resolution for dimensions (1920x1080 * 2 -> 3840x2160)
@therne
therne / word-sphere.js
Last active April 20, 2021 02:30
WordSphere - A rotating sphere of words. (NOTE: fuck IE support)
/**
* WordSphere
* Written by Hyojun Kim in 2017. Licensed in MIT.
*/
function wordSphere(canvas, texts, counts, options) {
const π = Math.PI; // happy math!
const {
width = 500,
height = 500,
radius = 150,
@briankasingli
briankasingli / .content.xml
Last active March 1, 2023 19:49
AEM 6.4 RichText Editor - Enable all features, and disable inline full screen option; the inline fullscreen option causes too many problems.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Rich Text"
sling:resourceSuperType="core/wcm/components/text/v2/text"
componentGroup="General"/>