Skip to content

Instantly share code, notes, and snippets.

View behumble's full-sized avatar

Alan Goo behumble

View GitHub Profile
@K1ethoang
K1ethoang / Active StarUml version 6 for Window | MacOS | Linux.md
Last active April 22, 2025 01:27
Active StarUml version 6 for Window | MacOS | Linux
@webmaster128
webmaster128 / TOUR_COMSJS_STARGATE.md
Last active March 10, 2025 03:18
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 October 14, 2024 15:38
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 February 18, 2025 07:28
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 March 20, 2025 22:45
AWS 보안 관련 자료 모음집

AWS 학습 링크집 시리즈

@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active April 18, 2025 10:17
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 = ['', '만', '억', '조'],