Skip to content

Instantly share code, notes, and snippets.

View larvata's full-sized avatar

Larvata larvata

View GitHub Profile
@larvata
larvata / demo.coffee
Last active August 29, 2015 14:19
MeruTask 同步顺序执行异步任务
request = require 'request'
client= require('redis').createClient()
meru=require './libs/meruTask'
###
GET lastPostId FROM api (getLastPostIdFromAPI)
GET nextPostId FROM redis DEFAULTS 1 (getNextPostIdFromRedis)
LOOP:
IF nextPostId<=lastPostId (checkNewPostsAvailable)
@larvata
larvata / tampermonkey-755-contextmenu.js
Last active May 25, 2016 20:14
enable context menu for 755 images
// ==UserScript==
// @name 7gogo Image Helper
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match https://7gogo.jp/*
// @grant none
// ==/UserScript==
@larvata
larvata / script.js
Last active March 24, 2017 03:23
Student Portal Auto Login
// ==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==

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 / docker-cheatsheet.md
Created March 5, 2017 08:09
my docker cheat sheet

docker cheatsheet

  1. Remove all stopped containers
docker container prune
  1. Remove all dangling images
# list
@larvata
larvata / SmartVirtualList.js
Created November 23, 2017 03:08
an infinite scroll component which didn't require the item height
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
@larvata
larvata / index.js
Last active February 7, 2018 10:12
dump pages from zasshi-online.com
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) => {
// ==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 / SMBDIS.ASM
Created October 28, 2019 01:20 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;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