Skip to content

Instantly share code, notes, and snippets.

View sookcha's full-sized avatar

Hoseong Son sookcha

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sookcha on github.
  • I am sookcha (https://keybase.io/sookcha) on keybase.
  • I have a public key ASDNt_m5SgWpHKznQE6newLVs9JhTBUDK4S1K8ijt3ndbAo

To claim this, I am signing this object:

import calendar
import datetime
from random import randint
today = datetime.date.today()
first_and_last_day = calendar.monthrange(today.year, today.month)
determined_date = randint(first_and_last_day[0], first_and_last_day[1])
print(determined_date)
@sookcha
sookcha / jwtRS256.sh
Created November 7, 2018 06:16 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@sookcha
sookcha / lidopen.sh
Last active May 3, 2019 05:52
Find out the time when the lid of MacBook was opened today
DATE=`date +%Y-%m-%d`
pmset -g log | grep -e Wake | grep $DATE
@sookcha
sookcha / Makefile
Created March 21, 2017 07:17
Makefile with GLEW and GLUT on macos
# OBJS specifies which files to compile as part of the project
OBJS = vcl.cpp
# CC specifies which compiler we're using
CC = g++
# INCLUDE_PATHS specifies the additional include paths we'll need
INCLUDE_PATHS = -I/usr/local/Cellar/include -I/opt/X11/include
# LIBRARY_PATHS specifies the additional library paths we'll need
@sookcha
sookcha / simpleapns.php
Created May 2, 2012 06:55
Simple APNS Example
<?php
$deviceToken = 'YOUR DEVICE TOKEN'; // Device Token ID
$message = $_GET['url']; // Message
// Development
$apnsHost = 'gateway.sandbox.push.apple.com';
$apnsCert = 'apns-dev.pem';
// Production
//$apnsHost = 'gateway.push.apple.com';