Skip to content

Instantly share code, notes, and snippets.

Avatar

Larvata larvata

View GitHub Profile
View gist:ecc40b386011570301abf4526d8f8ded
/*
eslint-disable
max-classes-per-file,
class-methods-use-this,
*/
const sample = [
];
@larvata
larvata / download-playboy.js
Created Apr 10, 2022
bookmarklet for saving 週プレ images
View download-playboy.js
// using online bookmarklet tools
// https://www.yourjs.com/bookmarklet/
function saveImge(url, fileName) {
const a = document.createElement('a');
a.href = url;
a.download = fileName;
a.click();
}
View zhihu-hidden-header-footer.js
@larvata
larvata / SMBDIS.ASM
Created Oct 28, 2019 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
View SMBDIS.ASM
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
View instagram easy save
// ==UserScript==
// @name instagram easy save
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.instagram.com/
// @grant none
// ==/UserScript==
@larvata
larvata / index.js
Last active Feb 7, 2018
dump pages from zasshi-online.com
View index.js
const fs = require('fs');
const requestDefault = require('request');
const curlParser = require('parse-curl');
const Jimp = require('jimp');
const jar = requestDefault.jar();
const request = requestDefault.defaults({ jar });
const requestPromise = (requestOption) => new Promise((resolve, reject) => {
request(requestOption, (err, res) => {
@larvata
larvata / SmartVirtualList.js
Created Nov 23, 2017
an infinite scroll component which didn't require the item height
View SmartVirtualList.js
import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
// todos
// - move the ref of each item componnent to it's parent
// - check the SSR result, because the actual content only rendered after did mount
// d - is set containerDOM.style.height in did update necessary?
// d - rename padding elements to beforePadder, afterPadder
// - set the buffer height to the height of container by default
View docker-cheatsheet.md

docker cheatsheet

  1. Remove all stopped containers
docker container prune
  1. Remove all dangling images
# list
View ffmpeg-cheatsheet.md

ffmpeg Cheatsheet

  • Join TS Files
  • Convert TS to MP4
  • Download Online AES-128 Encrypted HLS video
  • Convert Video to GIF
  • Extract Audio and Convert it to MP3
  • Burn Subtitles into Video

Join TS Files

@larvata
larvata / script.js
Last active Mar 24, 2017
Student Portal Auto Login
View script.js
// ==UserScript==
// @name Student Portal Auto Login
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match http://localhost/login*
// @grant none
// ==/UserScript==