Skip to content

Instantly share code, notes, and snippets.

View bokinga's full-sized avatar

Bokinga bokinga

View GitHub Profile
@veltman
veltman / README.md
Created September 2, 2017 12:31
SVG animation to video

Converting an SVG animation to a video with the MediaRecorder API and a hidden canvas.

Drawing frames from img elements can introduce an extra delay, so this version generates all the frames upfront and then renders them in a loop with requestAnimationFrame().

See also: Canvas animation to video

@ivanpopelyshev
ivanpopelyshev / pixi-tween-ticker-hack.js
Created August 4, 2017 12:26
Possible solution for GSAP/tweenlite and pixi integration
PIXI.Ticker.prototype._requestIfNeeded = function()
{
if (!this.gsapTick) {
//do a research, where is the passed time
this.lastTime = performance.now();
this.gsapTick = (event) => { this.update(MILLISECONDS_PASSED_IN_EVENT_I_DONT_KNOW) };
//do a research how to call it after all the other listeners
TweenLite.ticker.addEventListener("tick", this.gsapTick);
}
@welcoMattic
welcoMattic / imagemin.md
Last active February 15, 2022 20:58
How to fix `Error: spawn ./node_modules/jpegtran-bin/vendor/jpegtran ENOENT` error for imagemin

If you're trying to run imagemin (from grunt or gulp or anything else) on Alpine, you certainly had to meet this error :

Error: spawn /YOUR_PROJECT_PATH/node_modules/jpegtran-bin/vendor/jpegtran ENOENT or the same with optipng or gifsicle instead of jpegtran.

Here's how to solve it.

First you need to install on Alpine missing package used to compile jpegtran, gifsicle and optipng binaries. Those packages are (at least):

autoconf automake file build-base nasm musl libpng-dev zlib-dev

@caseywatts
caseywatts / quicktime-hangouts-recording.md
Last active February 14, 2024 02:18
Quicktime Hangouts Recording (using soundflower for audio)

Short link to this page: caseywatts.com/quicktime

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Quicktime + Hangouts Recording

Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:

@andrewstobbe
andrewstobbe / MacOSXSierra:Brew+Apache+Mysql+PHPSwitcher+DNSMasq+SSL.md
Last active July 19, 2021 02:12
Mac OSX Sierra : Brew Apache + Mysql + PHP Switcher + DNSMasq + SSL

Mac OSX Sierra : Brew Apache + Mysql + PHP Switcher + DNSMasq + SSL 👍

Things I had to do using Homebrew to get my local web dev environment back up and running after migration to OSX Sierra + Xcode 8.1.

Note: I used brew reinstall because I had already installed most of this previously under Yosemite. Probably better ways to do this, but this is what worked for me.

brew doctor

brew tap homebrew/dupes
brew tap homebrew/versions
@augbog
augbog / Free O'Reilly Books.md
Last active May 14, 2024 10:27
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.

Electron Drag’n’Drop

Allows files(s) to be dragged inside the electron app as well as files to be dropped out (when dropped on the desktop e.g. the file will be copied to the destination.

Installation

Clone the Quick Start repository:
git clone https://github.com/electron/electron-quick-start

Go into the repository:

@warking
warking / install_linuxbrew_on_centos7.sh
Last active August 19, 2023 19:26
standalone linuxbrew setup script for CentOS 7
# Non-root account is recommended for this process
# centos-specific prepration
sudo yum -y update && sudo yum -y groupinstall 'Development Tools' && sudo yum -y install curl irb m4 ruby
# Sanitize the environment
PATH=~/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
unset LD_LIBRARY_PATH PKG_CONFIG_PATH
# install linuxbrew
@arun99178
arun99178 / jack-in-the-box-init.js
Created November 9, 2015 11:18 — forked from srikat/jack-in-the-box-init.js
Scroll animations in WordPress using Animate.css, Jack In The Box and Waypoints. http://sridharkatakam.com/scroll-animations-wordpress-using-animate-css-jack-box-waypoints/
jQuery(function() {
@stonehippo
stonehippo / install_ruby_with_rbenv.md
Last active June 14, 2024 00:32
Installing a new Ruby with rbenv on Mac OS

Install a new Ruby with rbenv on Mac OS (and make yourself a superhero)

If you're doing stuff with Ruby on a Mac, e.g. installling Jekyll or something, by default you'll end up having to use the sudo command to do stuff, since the permission to modify the default config is not available to your user account.

This sucks and should be avoided. Here's how to fix that.

Installing a new Ruby

To make this better, we are going install a new, custom Ruby. This used to be a big, scary thing, but thanks to the awesome tools Homebrew and rbenv, it's a snap.*

A word of warning: you will have to use Terminal to install this stuff. If you are uncomfortable with text, words, and doing stuff with your computer beyond pointing and hoping, this may not work well for you. But if that's the case, I'm not sure why you were trying to use Ruby in the first place.