Skip to content

Instantly share code, notes, and snippets.

View sungjk's full-sized avatar
🇰🇷
sup

Jeremy Kim sungjk

🇰🇷
sup
View GitHub Profile
@sungjk
sungjk / gist:d7b2544589c3783957f58a7612bbfe4e
Last active January 15, 2026 12:02
Privacy Policy for GitHub PR Sidebar Resizer

Overview

GitHub PR Sidebar Resizer is a browser extension that allows users to resize the file tree sidebar on GitHub Pull Request pages. This privacy policy explains how we handle user data.

Data Collection

We do not collect any personal data.

This extension:

  • Does NOT collect any personal information
@sungjk
sungjk / gist:199a8179779890d6ef903a01b3b3bd8b
Created January 14, 2026 08:31
Privacy Policy for Google Calendar Sidebar Resizer
Privacy Policy for Google Calendar Sidebar Resizer
Last updated: January 2025
This extension does not collect, store, or transmit any personal data.
Data Storage:
- The only data stored is your preferred sidebar width setting
- This data is stored locally on your device using Chrome's storage API
- No data is sent to external servers
[
{
"key": "FEATURE_NEW_CREATE_POST",
"enabled": false,
"debug": false,
"permission": {
"enabled": false,
"debug": false,
"user_ids": []
},
@sungjk
sungjk / groupedCollect.scala
Created August 10, 2018 15:56
`groupedCollect` helper method for parallelism
object future {
def groupedCollect[A, B](xs: Seq[A], par: Int)(f: A => Future[B]): Future[Seq[B]] = {
val bsF: Future[Seq[B]] = Future.value(Seq.empty[B])
xs.grouped(par).foldLeft(bsF){ case (bsF, group) => {
for {
bs <- bsF
xs <- Future.collect(group.map(f))
} yield bs ++ xs
}}
}
@sungjk
sungjk / groupBy.js
Created July 25, 2018 06:43
groupBy for javascript
function groupBy(xs, key) {
return xs.reduce(function (rv, x) {
let v = key instanceof Function ? key(x) : x[key];
let el = rv.find((r) => r && r.key === v);
if (el) {
el.values.push(x);
} else {
rv.push({
key: v,
values: [x]
@sungjk
sungjk / Functional.java
Last active July 9, 2018 05:44
functional programming style helpers for JAVA
public class Functional {
public interface Function3<A,B,C,R> {
R apply(A a, B b, C c) throws Throwable;
}
public static class Either<L, R> {
final public Optional<L> left;
@sungjk
sungjk / exception.java
Created June 22, 2018 02:04
try-catch-finally on Java
public static String lem() {
System.out.println("lem");
return "return from lem";
}
public static String foo() {
int x = 0;
int y = 5;
try {
System.out.println("start try");
@sungjk
sungjk / dijkstra.scala
Last active June 6, 2018 08:32
Dijkstra algorithm
object GlobalGraph {
type NodeId = Int
type Distance = Int
type Nodes = Set[Node]
type Path = (Nodes, Distance)
type Graph = Map[Edge, Distance]
case class Node(id: NodeId, dist: Distance = Int.MaxValue, prevNode: Option[Node] = None)
case class Edge(from: NodeId, to: NodeId)
}
@sungjk
sungjk / KeyValueStore.sol
Created May 31, 2018 06:21
KeyValueStore.sol
contract KeyValueStore {
uint256 keyIndex;
struct values {
string value1;
string value2;
}
mapping (uint256 => values) Obj;
@sungjk
sungjk / Par.scala
Last active June 16, 2018 12:21
Par.scala
class ExecutorService {
def submit[A](a: Callable[A]): Future[A]
}
trait Callable[A] { def call: A }
trait Future[A] {
def get: A
def get(timeout: Long, unit: TimeUnit): A
def cancel(evenIfRunning: Boolean): Boolean