Skip to content

Instantly share code, notes, and snippets.

View webstory's full-sized avatar

Hoya Kim webstory

View GitHub Profile
@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
@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 / 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 / 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 / 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 / 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
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@webstory
webstory / Main.java
Created March 23, 2018 08:14
Java regex example
import java.util.regex.Pattern;
import java.util.regex.Matcher;
class Main {
public static void main(String[] args) {
String s = "여기는.어디.입니까-12";
Pattern p = Pattern.compile("^([^.]+\\.[^.]+\\.[^-.]+)(?:-([0-9]{2}))?$");
Matcher m = p.matcher(s);
if(m.find()) {
@webstory
webstory / diffusion.c
Last active March 14, 2018 09:31
Python ffi
/* filename: diffusion.c
* compile:
* gcc -O3 -std=gnu99 -c diffusion.c
* gcc -shared -o diffusion.so diffusion.o
*
* .so file place /usr/lib or /usr/local/lib or set LD_LIBRARY_PATH for custom location
*/
void evolve(int w, int h, double **in, double **out, double D, double dt) {
int i, j;