Skip to content

Instantly share code, notes, and snippets.

View webstory's full-sized avatar

Hoya Kim webstory

View GitHub Profile
@webstory
webstory / pluscode.js
Last active April 4, 2018 07:00
Google plus code decoder/encoder
'use strct'
const _ = require('lodash')
const LETTERS = Array.from("23456789CFGHJMPQRVWX")
const R_LETTERS = _.invert(LETTERS)
const ELEVENTH = (function() {
const dy = 0.000025
const dx = 0.00003125
@webstory
webstory / regex.c
Last active June 7, 2018 04:19
C regex for ini parse
#include <stdio.h>
#include <regex.h>
#include <string.h>
void getIni(char *result, const char *iniStr, const char *name) {
regex_t re;
char pattern[128];
regmatch_t groups[2];
sprintf(pattern, "\\s*%s\\s*=\\s*([^\r\n]+)", name);
@webstory
webstory / README.md
Last active July 4, 2018 23:55
Inkbunny favorites crawler

Inkbunny favorites downloader

Author: Hoya Kim

Prerequirements

  • Node.js 6 or higher
  • latest npm package manager
  • Large enough free space of storage

How to use it

  • Download sync.js
@webstory
webstory / stream-test.js
Last active December 14, 2018 01:41
Nodejs 8 object stream
const stream = require('stream');
class Producer extends stream.Readable {
constructor(options) {
options = Object.assign({
highWaterMark: 5,
objectMode: true
}, options);
super(options);
@webstory
webstory / get-directories.py
Created December 20, 2018 05:14
Google Cloud Storage getDirectories for python
import googleapiclient.discovery
def list_directories(bucket, prefix):
"""Returns a list of directory of the objects within the given bucket."""
service = googleapiclient.discovery.build('storage', 'v1')
# Create a request to objects.list to retrieve a list of objects.
req = service.objects().list(
bucket=bucket,
prefix=prefix,
@webstory
webstory / latest.log
Last active January 13, 2022 18:09
Valhelsia 4 4.1.1 Client crash report
[02:46:52] [main/INFO]: ModLauncher running: args [--username, Hoya82, --version, 1.17.1, --gameDir, ..\..\instances\Valhelsia 4 1 17, --assetsDir, ..\..\datastore\assets, --assetIndex, 1.17, --uuid, a1eb9c92d1154dbca02fa41b6365df98, --accessToken, ????????, --userType, mojang, --versionType, release, --launchTarget, forgeclient, --fml.forgeVersion, 37.1.1, --fml.mcVersion, 1.17.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210706.113038, --width, 854, --height, 480]
[02:46:52] [main/INFO]: ModLauncher 9.0.7+91+master.8569cdf starting: java version 17.0.1 by Eclipse Adoptium
[02:46:55] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=union:/C:/Users/hoya/AppData/Roaming/gdlauncher_next/datastore/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar%2316! Service=ModLauncher Env=CLIENT
[02:46:55] [main/INFO]: Found mod file absentbydesign-1.17.1-1.6.0.jar of type MOD with locator {mods folder locator at C:\Users\hoya\AppData\Roaming\gdlauncher_next\instances\Valhelsia 4 1 17