Skip to content

Instantly share code, notes, and snippets.

View behumble's full-sized avatar

Alan Goo behumble

  • �self employed
  • Incheon, Korea
  • X @behumble
View GitHub Profile
@webmaster128
webmaster128 / TOUR_COMSJS_STARGATE.md
Last active June 3, 2024 05:57
CosmJS + Stargate – A guided tour

Support for Cosmos SDK Stargate in CosmJS has been ongoing work for several months now. Stargate is released and CosmJS is here to connect to it.

Starting points

Let's explore what is new for Stargate support:

@nakov
nakov / ECDSA-secp256k1-example.java
Last active July 21, 2023 09:37
ECDSA with secp256k1 in Java: generate ECC keys, sign, verify
import org.bouncycastle.util.encoders.Hex;
import org.web3j.crypto.*;
import java.math.BigInteger;
public class ECCExample {
public static String compressPubKey(BigInteger pubKey) {
String pubKeyYPrefix = pubKey.testBit(0) ? "03" : "02";
String pubKeyHex = pubKey.toString(16);
String pubKeyX = pubKeyHex.substring(0, 64);
@darkstone
darkstone / ReadPrivateRSAKey.kt
Created January 27, 2018 16:35
How to read RSA private key from SSL command output.
val rivateKey = privateKeyAsText
.replace("-----BEGIN PRIVATE KEY-----\n", "")
.replace("-----END PRIVATE KEY-----", "")
.replace("\n", "")
.let {
val encodedKey = Base64.getDecoder().decode(it)
val kf = KeyFactory.getInstance("RSA")
val keySpec = PKCS8EncodedKeySpec(encodedKey)
kf.generatePrivate(keySpec) as RSAPrivateKey
}
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active May 22, 2024 13:44
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@alexhayes
alexhayes / pyenv+direnv on OSX.md
Last active November 6, 2022 20:17
Awesomely easy virtualenvs on OSX using pyenv and direnv

Awesomely easy virtualenvs on OSX using pyenv and direnv

Never forget to activate that virtualenv or set that environment variable ever again...

Install

  1. Install pyenv

     brew install pyenv
    
@serithemage
serithemage / AWSSecurityContents.md
Last active May 24, 2024 06:17
AWS 보안 관련 자료 모음집

AWS 학습 링크집 시리즈

@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active July 8, 2024 04:41
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@hassy
hassy / lambda.js
Last active September 19, 2022 17:20
Different behavior of context.succeed() vs callback() in AWS Lambda
//
// Lambda's timeout needs to be >5 seconds, 10 should do
//
var startedAt = new Date();
var interval = setInterval(function () {
console.log(startedAt, new Date());
}, 1000);
@jihunleekr
jihunleekr / numberstring.js
Created November 23, 2015 02:12
숫자를 한글발음대로 표기
/**
* 숫자를 한글발음대로 표기
* 구글 스프레드시트에서는 아래의 함수가 없어서 구현함.
* 한글만 지원. (원래 함수는 한자 등의 다양한 타입을 지원함)
*/
function numberstring(num) {
var namesInSeat = ['', '일', '이', '삼', '사', '오', '육', '칠', '팔', '구'],
namesInSeats = ['', '십', '백', '천'],
namesInFourSeat = ['', '만', '억', '조'],
@benelog
benelog / Volley.md
Last active October 20, 2023 02:05
Volley 설명

안드로이드 개발에서 많은 비중을 차지하는 UI패턴은 ListView에서 여러 이미지를 보여주는 Activity입니다. 전형적인 흐름을 정리하면 아래와 같습니다.

​1. 목록조회 API호출

​2. API를 파싱하고 ListView에 데이터를 보여 줌.

​3. 각 아이템마다의 이미지 주소로 다시 서버를 호출

​4. 이미지를 디코딩하고 ImageView에서 보여줌.