Skip to content

Instantly share code, notes, and snippets.

View theand's full-sized avatar

Heesang Chae theand

  • South Korea
View GitHub Profile
// ==UserScript==
// @name designmode-on
// @namespace http://127.0.0.1
// @description User Script for designmode-on
// @author Heesang Chae
// @include *
// @require https://cdn.jsdelivr.net/gh/theand/userscript-util@latest/exec.js
// @version 2018.01.09
// @grant none
// ==/UserScript==
@theand
theand / intellij.vmoptions
Created April 22, 2019 11:33
intellij vmoptions
-server
-ea
-Xmx3072m
-Xms1536m
-XX:+UseG1GC
-XX:-UseParNewGC
-XX:-UseConcMarkSweepGC
-XX:ReservedCodeCacheSize=240m
-XX:+OmitStackTraceInFastThrow
-Dsun.io.useCanonCaches=false
@theand
theand / build.py
Created August 22, 2018 03:57
TIL에서 index.md 를 만들기 위한 수동 코드.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## 사용법 : til 디렉토리에서 python build.py 를 실행하면 index.md 파일을 생성합니다.
## index.md에는 .md 확장자를 가진 파일들의 목록이 디렉토리별로 들어갑니다.
from __future__ import unicode_literals
from __future__ import print_function
import os
@theand
theand / download.pl
Created August 22, 2018 03:53
download http url
#!/usr/bin/env perl
use strict;
use warnings;
use File::Fetch;
my $url = $ARGV[0];
print "downloading $url\n";
@theand
theand / sol1.js
Created January 22, 2018 08:51
정수 배열(int array)가 주어지면 가장 큰 이어지는 원소들의 합을 구하시오
var array1 = [-1, 3, -1, 5];
var array2 = [-5, -3, -1];
var array3 = [2, 4, -2, -3, 8];
const map1 = array3.map( (e,i,a) => {
return a.slice(i).reduce( (a, b) => a+b, 0);
});
console.log(Math.max(...map1));
@theand
theand / javadocs-refined.user.js
Last active January 7, 2024 10:17
User Script for javadocs - link style, code highlight (docs.spring.io, docs.oracle.com)
// ==UserScript==
// @name javadocs-refiner
// @namespace http://127.0.0.1
// @description User Script for javadocs - link style, code highlight (docs.spring.io, docs.oracle.com)
// @author Heesang Chae
// @include /https?://docs.spring.io/
// @include /https?://docs.oracle.com/
// @include /https?://openjdk.java.net/jeps/
// @exclude /https?://docs.spring.io/spring-framework/docs/5/
// @exclude /https?://docs.spring.io/.*/site/xref/
@theand
theand / email.py
Created August 9, 2017 02:24
email.py
from email.mime.text import MIMEText
def CreateMessage(sender, to, subject, message_text):
"""Create a message for an email.
Args:
sender: Email address of the sender.
to: Email address of the receiver.
subject: The subject of the email message.
@theand
theand / docs-spring-io-code-syntax.user.js
Last active September 22, 2017 05:07
Deprecated. ~User Script for docs.spring.io code highlight~ go to https://gist.github.com/theand/90f75fc03b8a32feff4473c1c97277b9
// ==UserScript==
// @name docs.spring.io code highlight
// @namespace http://127.0.0.1
// @description User Script for docs.spring.io code highlight
// @author Heesang Chae
// @include http://docs.spring.io/*
// @require https://cdn.jsdelivr.net/prism/1.6.0/prism.js
// @require https://cdn.jsdelivr.net/prism/1.6.0/components/prism-java.min.js
// @require https://cdn.jsdelivr.net/gh/mathiasbynens/he@v1.1.1/he.js
// @version 2017.07.18