Skip to content

Instantly share code, notes, and snippets.

View foriequal0's full-sized avatar
🤓
I may be slow to respond.

SeongChan Lee foriequal0

🤓
I may be slow to respond.
  • Seoul, South Korea
  • 13:11 (UTC +09:00)
View GitHub Profile
@foriequal0
foriequal0 / password-special-chars-position-hist.rs
Last active January 13, 2018 12:29
비밀번호 특수문자 위치 히스토그램
#!/usr/bin/env run-cargo-script
use std::env;
use std::fs::File;
use std::io::{BufReader, BufRead};
use std::collections::HashMap;
use std::vec::Vec;
use std::iter::FromIterator;
fn main()
@foriequal0
foriequal0 / apt-rollback-recent.py
Created January 30, 2018 19:49
Helps to rollback recently installed apt package
from collections import namedtuple
def get_records(lines):
records = []
record = []
for line in lines:
if line.isspace():
records.append(record)
record = []
else:
@foriequal0
foriequal0 / brunch-shift-space-unblock.user.js
Last active July 5, 2018 06:56
Brunch Shift+Space unblocker
// ==UserScript==
// @name Brunch Shift+Space unblocker
// @version 1
// @match https://brunch.co.kr/*
// @match http://brunch.co.kr/*
// @run-at document-end
// @grant none
// ==/UserScript==
let html = document.getElementsByTagName('html')[0];
#!/bin/bash
set -e
# The touchpad loses its two finger scrolling ability after awaken from hibernate.
PROGNAME=$(basename "$0")
state=$1
action=$2
MODNAME=${PROGNAME#reload-}
function log {
{
"title": "Disable Cmd-q for FireFox",
"rules": [
{
"description": "Disable Cmd-q for FireFox",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [ "org\\.mozilla\\.firefoxdeveloperedition" ],
@foriequal0
foriequal0 / redirect-twitter-mobile.user.js
Last active January 12, 2019 18:47
Redirect Twitter mobile
// ==UserScript==
// @name Redirect Twitter mobile
// @version 1
// @grant none
// @match *://twitter.com/*
// @run-at document-start
// ==/UserScript==
let match = /^(\w+):\/\/twitter.com\/(.*)$/.exec(window.location.href);
if (match) {
@foriequal0
foriequal0 / gssk.user.js
Created February 20, 2019 16:18
곽서심교.js
// ==UserScript==
// @name GSSK
// @namespace gist.github.com/foreiqual0
// @description 곽금주 서울대 심리학과 교수 => 곽서심교
// @include *
// @exclude file://*
// @version 1
// @grant none
// @run-at document-start
// ==/UserScript==
@foriequal0
foriequal0 / rusty-lake-beaker.rs
Last active April 27, 2020 04:03
Solve Rusty Lake's beaker puzzle.
use std::cmp::min;
use std::collections::VecDeque;
const BEAKERS: usize = 3;
const INITIAL_STATE: State = State {
beakers: [
Beaker::new(10, 0),
Beaker::new(5, 5),
Beaker::new(6, 6),
@foriequal0
foriequal0 / .gitconfig
Last active April 26, 2021 14:39
gitconfig
[user]
useConfigOnly = true
[alias]
graph = log --oneline --decorate --graph
ignore = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi"
[remote]
pushdefault = origin
[push]
default = simple
[fetch]
@foriequal0
foriequal0 / naver-webtoon-most-recent.user.js
Last active July 10, 2021 15:48
네이버 웹툰 최신회차 바로가기
// ==UserScript==
// @name 네이버 웹툰 최신회차 바로가기 버튼
// @namespace gist.github.com/foreiqual0
// @include https://comic.naver.com/webtoon/list.nhn?*
// @include https://comic.naver.com/webtoon/detail.nhn?*
// @include https://comic.naver.com/bestChallenge/list.nhn?*
// @include https://comic.naver.com/bestChallenge/detail.nhn?*
// @include https://comic.naver.com/challenge/list.nhn?*
// @include https://comic.naver.com/challenge/detail.nhn?*
// @include https://comic.naver.com/webtoon/weekday.nhn