Skip to content

Instantly share code, notes, and snippets.

let clientX = -100;
let clientY = -100;
const innerCursor = document.body.appendChild(document.createElement('div'));
innerCursor.style =
'width:0px; height:0px; border-left: 10px solid red; border-bottom: 10px solid transparent; position:absolute; top:0; left:0; z-index:999; pointer-events:none;';
document.addEventListener('mousemove', (e) => {
clientX = e.clientX;
clientY = e.clientY;
});
const render = () => {

Keybase proof

I hereby claim:

  • I am merapi on github.
  • I am merapi (https://keybase.io/merapi) on keybase.
  • I have a public key whose fingerprint is 7AD6 8611 381E 0D2F F5EB 2E34 1997 70E1 CF32 928C

To claim this, I am signing this object:

@merapi
merapi / fluent-ffmpeg-custom-args.js
Created February 16, 2020 20:03 — forked from DusanBrejka/fluent-ffmpeg-custom-args.js
node-fluent-ffmpeg - Execute Custom FFMPEG arguments hack
/*
As at the time of writing this Fluent ffmpeg-API for node.js has not been updated
for years and still does not support custom FFMPEG attributes, the only solutions
are either forking it or resorting to hacks like this one...
Please use it only when fluent does not support more complex arguments
(like generating multi-rendition HLS with all playlists in a single command)
NOTE: this does not support 'progress' event, but you can do it easily by
parsing 'stderr' event with extractProgress method from fluent-ffmpeg/lib/options.js
@merapi
merapi / Dockerfile-nodejs
Created January 11, 2020 12:59 — forked from dweinstein/Dockerfile-nodejs
Install node modules before copying over your working code so that node_modules are built (and cached) before you change your service code!
# ...
ADD package.json /tmp/package.json
RUN cd /tmp && npm install && \
mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/
# ...
WORKDIR /opt/app
ADD . /opt/app
# Decompile APK
apktool d path/to/app.apk -o output/directory
# Remove SSL pinning
grep -R "CertificatePinner" .
// remove lines like
invoke-virtual {v2, v3, v4}, Lokhttp3/CertificatePinner$Builder;->add(Ljava/lang/String;[Ljava/lang/String;)Lokhttp3/CertificatePinner$Builder;
move-result-object v2
# Recompile APK
@merapi
merapi / combinators.js
Created October 16, 2019 15:05 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
@merapi
merapi / 0-README.md
Created June 18, 2019 19:55 — forked from sc0ttkclark/0-README.md
PhpStorm.app Mac integration with Tower.app for diff and merge - https://youtrack.jetbrains.com/issue/WI-26090

PhpStorm.app Mac integration with Tower.app for diff and merge

You must place both files in the ~/Library/Application Support/com.fournova.Tower2/CompareTools/ directory and chmod +x phpstorm.sh

This integration is based on the one I found for Beyond Compare's beta integration:

https://github.com/tednaleid/git-tower-beyond-compare-shim

// This doesn't work
// I'd like to figure out why it doesn't.
// I get the following error:
// Heading(...): A valid React element (or null) must be returned.
// You may have returned undefined, an array or some other invalid object.
import styled from 'styled-components';
export const getFontSize = ({ level }) => `${0.5 + (1 / level)}rem`;
const Heading = ({ level }) => {
@merapi
merapi / config.fish
Created November 19, 2016 21:02 — forked from ordovician/config.fish
My configuration file for the fish shell
# Make the blue color for directories more readable
set -x LSCOLORS Exfxcxdxbxegedabagacad
# this is needed to avoid strange python stack backtrace complaining about UTF-8 when
# running sphinx. Found it by googling
set -x LC_ALL en_US.UTF-8
set -x LANG en_US.UTF-8
set -x JULIA_EDITOR textmate
# so our brew install override the commands from the system