Skip to content

Instantly share code, notes, and snippets.

View Jessidhia's full-sized avatar

Jessica Franco Jessidhia

  • @pixiv Inc, pixiv desktop
  • Tokyo, Japan
View GitHub Profile
@dferber90
dferber90 / visual-regression-testing.md
Last active July 2, 2023 08:45
Visual Regression Testing in Jest

Visual Regression Testing with Jest

This is a walkthrough of how to set up Visual Regression Testing with Jest for an application created with create-react-app.

The following walkthrough uses React as an example, but the approach should work for any modern frontend library! I assume it can be used with Angular, Vue, Cycle.js and more.

This gist walks you through a create-react-app application as an example of how to set up Visual Regression Testing in Jest using libraries I wrote recently which enable this: jsdom-screenshot, jest-transform-css and jest-transform-file.

@esbullington
esbullington / intro.md
Last active September 30, 2018 11:59
Convert Stylus to SASS/SCSS

Convert Stylus to SASS

Here's how I converted a whole batch of Stylus files to SASS without using a converter (none exist, that I'm aware of), converting each Stylus file manually, or programming my own Stylus->SASS converter, which would have entailed building a parser, and then generate SCSS from the AST.

First, grab sandr.py here: https://github.com/jfgiraud/sandr

Then, in the directory of your Stylus files, run (if you have multiple directory levels, you can do similar task using find):

for file in *.styl; do echo "/*! FILENAME: $file */" >tempfile; cat $file >>tempfile; mv tempfile $file; done 
@paulirish
paulirish / what-forces-layout.md
Last active November 15, 2024 16:45
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
@feross
feross / 1 - top dependencies.txt
Last active July 13, 2023 22:39
standard stats (updated 2017-06-23)
`standard` is the 52th most depended on npm module. (counting dependencies and devDependencies)
--------
SPECIFIC MODULES
--------
standard 9860
snazzy 1004
eslint-config-standard 4235
@louischan
louischan / firefox-gestures.md
Last active March 1, 2022 16:53
Enable Multi-touch Gestures in Firefox
  1. Open about:config in Firefox
  2. Set the following values
  3. Restart Firefox
browser.snapshots.limit           5
browser.gesture.pinch.in          cmd_fullZoomReduce
browser.gesture.pinch.out         cmd_fullZoomEnlarge
browser.gesture.pinch.latched     false
browser.gesture.pinch.threshold 35
@ChrisK2
ChrisK2 / README.md
Last active August 29, 2015 14:07
ytdl_hook.lua

youtube-dl hook script for mpv

Now part of mpv

As of 079ecd7 (2014-11-19), the hook script is now integrated into mpv and will be avaiblable when compiled with LUA support. It is (currently) disabled by default, to enable it add --ytdl=yes to your command-line or ytdl=yes to your mpv.conf.

Open Issues

@Jessidhia
Jessidhia / gist:5138803
Last active December 14, 2015 19:48
Class notes

Software Quality / Evaluation

  • Quality system implantation
  • Define scope
  • Diagnostics
  • Documentation
  • Transition
  • Quality system certification
  • Pre-audit (find non-conformities)
@Jessidhia
Jessidhia / fontconfig-2.8.0-win32.patch
Created March 23, 2011 10:31
give fontconfig some saner windows behavior and a saner caching behavior too
diff -ur fontconfig-2.8.0-orig/src/fcdir.c fontconfig-2.8.0/src/fcdir.c
--- fontconfig-2.8.0-orig/src/fcdir.c 2009-11-16 17:24:52.000000000 +0000
+++ fontconfig-2.8.0/src/fcdir.c 2011-03-23 10:28:31.000000000 +0000
@@ -203,8 +203,22 @@
/*
* Scan file files to build font patterns
*/
- for (i = 0; i < files->num; i++)
+ char buf1[512], buf2[512], pad[512], *str = &buf1[0], *prev = &buf2[0], *tmp;
+ int j, diff;