Skip to content

Instantly share code, notes, and snippets.

View chiwanpark's full-sized avatar

Chiwan Park chiwanpark

View GitHub Profile
@chiwanpark
chiwanpark / kakao-login.jsx
Created December 25, 2022 16:06
Kakao Login
import { useCallback, useEffect } from 'react';
import { Button } from 'components/button';
import { iconKakaoTalk } from 'components/icon';
const KAKAO_SDK_ID = 'solvesql_kakao_sdk';
const KAKAO_SDK_PATH = '//developers.kakao.com/sdk/js/kakao.min.js';
export const KakaoLogin = props => {
const { appKey, className } = props;
@chiwanpark
chiwanpark / install-arch-linux-rpi-zero-w.sh
Created November 22, 2017 12:42 — forked from larsch/install-arch-linux-rpi-zero-w.sh
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@chiwanpark
chiwanpark / sample.py
Created February 28, 2017 07:41
Python size of module
import sys
import numpy as np
print(sys.getsizeof(np)
From 428b2335978c852f0816cdb3c1de07db1db01a0d Mon Sep 17 00:00:00 2001
From: Chiwan Park <chiwanpark@icloud.com>
Date: Fri, 13 Jan 2017 11:43:44 +0900
Subject: [PATCH] Update font version to 1.2 and fix upstream URL
---
.SRCINFO | 10 ++++------
PKGBUILD | 11 +++++------
2 files changed, 9 insertions(+), 12 deletions(-)
@chiwanpark
chiwanpark / Job.java
Created February 9, 2016 11:07
Flink Inherited POJO Example
package com.chiwanpark.flink;
/**
* 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
@chiwanpark
chiwanpark / Example.java
Last active September 5, 2015 13:12
Example for hagersaleh
import org.apache.flink.api.common.functions.FilterFunction;
import org.apache.flink.api.common.functions.JoinFunction;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.tuple.Tuple5;
import org.apache.flink.examples.java.relational.TPCHQuery3.Customer;
import org.apache.flink.examples.java.relational.TPCHQuery3.Order;
class Example {
// TODO: NEED TO SET CORRECT PATH!
@chiwanpark
chiwanpark / PartitionCustomExample.java
Created July 14, 2015 17:47
Flink Custom Partitioner Example
import org.apache.flink.api.common.functions.Partitioner;
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.tuple.Tuple2;
public class PartitionCustomExample {
public static class MyPartitioner implements Partitioner<Integer> {
@Override
public int partition(Integer key, int numPartitions) {
return key % numPartitions;
@chiwanpark
chiwanpark / TestSample.scala
Last active August 29, 2015 14:24
Flink Scala ANY, ALL Example
import org.apache.flink.api.common.functions.RichFilterFunction
import org.apache.flink.api.scala.{ExecutionEnvironment, _}
import org.apache.flink.configuration.Configuration
import scala.collection.JavaConversions._
case class PC(var model: String, var price: Double)
case class Laptop(var model: String, var price: Double)
@chiwanpark
chiwanpark / office365.xml
Created April 22, 2015 07:47
Office 365 Pro Plus Custom Install Configuration (Word, Powerpoint, Excel only)
<Configuration>
<Add OfficeClientEdition="64">
<Product ID="O365ProPlusRetail">
<Language ID="ko-kr"/>
<ExcludeApp ID="Access"/>
<ExcludeApp ID="InfoPath"/>
<ExcludeApp ID="Groove"/>
<ExcludeApp ID="Lync"/>
<ExcludeApp ID="OneNote"/>
<ExcludeApp ID="Outlook"/>
@chiwanpark
chiwanpark / Job.java
Created March 26, 2015 02:06
Flink example for full element as join, cogroup key
package com.chiwanpark.flink;
import org.apache.flink.api.common.functions.CoGroupFunction;
import org.apache.flink.api.common.functions.JoinFunction;
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.util.Collector;
import java.io.Serializable;