Skip to content

Instantly share code, notes, and snippets.

View m7v's full-sized avatar
🇯🇵
私はノボシビルスクのエンジニアです

Andrew Mikhailov m7v

🇯🇵
私はノボシビルスクのエンジニアです
View GitHub Profile
{
"favicon": {
"url": "/favicon_urbi.png"
},
"page": {
"title": "Urbi Pro111",
"title[en]": "Urbi EN",
"title[arabic]": "Urbi AR"
},
"logo": {
@m7v
m7v / parserWHUW.js
Created July 15, 2019 09:29
Parse https://warhammerunderworlds.com for saving all cards from this game.
const https = require("https");
const axios = require("axios");
const fs = require("fs");
const os = require("os");
const cluster = require("cluster");
const STEP = 20;
const saveFailedImg = url => {
failedImg.push(url);
@m7v
m7v / parserStoreLine.js
Created July 15, 2019 09:28
Parse store.line for saving images.
const request = require("request");
const https = require("https");
const fs = require("fs");
const os = require("os");
const cluster = require("cluster");
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const regExpr = /(https:.*;compress=true)/g;
@m7v
m7v / kanjiParser.js
Created June 27, 2019 10:05
Parse Jisho site for extracting kangi and its translations.
const jsdom = require("jsdom");
const request = require("request");
const { JSDOM } = jsdom;
var items = [];
var page = 1;
var pageSize = 20;
var level = 'jlpt-n5';
@m7v
m7v / findNearbyLocations.js
Last active May 15, 2018 03:20
Fury of Dracula. Search algorithm.
const data = {
locations: {
atlantic_ocean: {
id: 'atlantic_ocean',
name: 'Atlantic Ocean',
isSea: true,
},
biscay_bay: {
id: 'biscay_bay',
name: 'Biscay bay',
@m7v
m7v / sw.js
Created March 16, 2018 04:02 — forked from tkh44/sw.js
Example of syncing some redux state with a service worker
const swSupported = !!('serviceWorker' in navigator)
const sendMessage = (messageData) => {
if (!swSupported) {
return
}
navigator.serviceWorker.controller.postMessage(messageData)
}
@m7v
m7v / sw.js
Created March 16, 2018 04:02 — forked from tkh44/sw.js
Example of syncing some redux state with a service worker
const swSupported = !!('serviceWorker' in navigator)
const sendMessage = (messageData) => {
if (!swSupported) {
return
}
navigator.serviceWorker.controller.postMessage(messageData)
}
@m7v
m7v / gist:06c5039cc50c071e3f8332cdf56eb856
Created February 6, 2018 05:42 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@m7v
m7v / gource.sh
Created February 2, 2018 15:03 — forked from XueshiQiao/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://git.libav.org/libav.git
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install
@m7v
m7v / how-to-gource.sh
Created February 2, 2018 14:29 — forked from miguelsaddress/how-to-gource.sh
Install Gource in Ubuntu (gource.io)
#Install Gource in Ubuntu
========================
#Go to the folder.... and
#see http://tylerfrankenstein.com/code/install-gource-ubuntu-1010-visualize-git-repo
sudo apt-get update
sudo apt-get install libsdl2-dev libsdl2-image-dev libpcre3-dev libfreetype6-dev libglew-dev libglm-dev libboost-filesystem-dev libpng12-dev libsdl1.2-dev libsdl-image1.2-dev libtinyxml-dev
./configure
make
sudo make install