Skip to content

Instantly share code, notes, and snippets.

View goranmoomin's full-sized avatar

Sungbin Jo (조성빈) goranmoomin

View GitHub Profile
@goranmoomin
goranmoomin / Brewfile
Last active February 4, 2019 16:51
Bootstraping my laptop
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/core"
tap "homebrew/services"
brew "cmake"
brew "dnscrypt-proxy", restart_service: true
brew "fish"
brew "roswell"
brew "tmux"
Array.from(document.querySelectorAll("*")).map(el => el.className).filter(x => x).reduce((a, b) => a + " " + b)
@goranmoomin
goranmoomin / modern-template.svg
Created February 25, 2019 18:21
Github badge template compatible with `gh-badges` from `badge/shield`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goranmoomin
goranmoomin / 1_all_webkit.patch
Last active May 16, 2019 13:14
One-stop patch for Emacs NS-port xwidget (by @veshboo)
diff --git a/configure.ac b/configure.ac
index d13dddfd9a..525c4c6703 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,7 +483,7 @@ AC_DEFUN
[with_file_notification=$with_features])
OPTION_DEFAULT_OFF([xwidgets],
- [enable use of some gtk widgets in Emacs buffers (requires gtk3)])
+ [enable use of some gtk widgets in Emacs buffers (requires gtk3 or macOS Cocoa)])
From 6d95860c506233502b8b9d59609e653085412092 Mon Sep 17 00:00:00 2001
From: Sungbin Jo <pcr910303@icloud.com>
Date: Thu, 25 Jul 2019 23:55:42 +0900
Subject: [PATCH 1/3] Add xwidget webkit support for macOS
Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* configure.ac: Allow '--with-xwidgets' for "${NS_IMPL_COCOA}".
* etc/NEWS: Mention new feature.
* etc/TODO: Remove done TODO to implement xwidget in NeXTstep port.
@goranmoomin
goranmoomin / enforester.js
Created November 22, 2019 01:08
enforestForStatement
enforestForStatement() {
this.matchKeyword("for");
const condition = this.matchParens();
const conditionEnforester = new Enforester(condition);
if(conditionEnforester.isPunctuator(conditionEnforester.peek(), ";")) {
conditionEnforester.advance();
const test = conditionEnforester.isPunctuator(conditionEnforester.peek(), ";") ? null : conditionEnforester.enforestExpression();
conditionEnforester.matchPunctuator(";");
const update = conditionEnforester.terms.length === 0 ? null : conditionEnforester.enforestExpression();
const body = this.enforestStatement();
@goranmoomin
goranmoomin / regex.c
Created November 30, 2019 16:42
Check if regex is a valid POSIX Extended regex
#include <stdio.h>
#include <regex.h>
int main(void) {
char pattern[256];
scanf("%s", pattern);
regex_t regex;
const int errcode = regcomp(&regex, (const char *)pattern, REG_EXTENDED);
if(errcode == 0) {
printf("regex valid\n");
@goranmoomin
goranmoomin / all-posts.sh
Last active December 26, 2020 12:36
Shell one liners to get various HN account information
#!/bin/sh
curl -s https://hacker-news.firebaseio.com/v0/user/pcr910303.json | jq '.submitted | .[]' | xargs -P30 -I{} sh -c 'curl --silent https://hacker-news.firebaseio.com/v0/item/{}.json | jq --raw-output '\''select(.type == "story" and .deleted != true) | .title'\'
@goranmoomin
goranmoomin / english-survey.conf
Last active December 26, 2019 10:25
English Survey Project NGINX configuration
server {
listen 8001;
server_name english-survey;
charset utf-8;
root $PWD;
location ~ ^/(auth|master|survey) {
proxy_redirect off;
@goranmoomin
goranmoomin / issue-log-83.md
Last active December 3, 2020 11:34
actix-service Cell::get_mut() is unsound