Skip to content

Instantly share code, notes, and snippets.

@kennyhyun
kennyhyun / registerStartupTask.ps1
Last active May 25, 2024 11:48
Bootstrapping WSL1 debian with SSH server
if (!$args[0]) {
write-error "taskName is require as the first argument"
exit -1;
}
if (!$args[1]) {
write-error "schedCommand is require as the second argument"
exit -1;
}
$taskName=$args[0]
$schedCommand=$args[1]
@kennyhyun
kennyhyun / readme.md
Last active January 10, 2024 13:39
Setting up S3 bucket using Minio on microk8s

Setting up S3 bucket using Minio on microk8s

Enable minio

microk8s enable minio

will install minio and create a tenant for you.

@kennyhyun
kennyhyun / readme.md
Last active October 31, 2023 11:43
Installing and setting up k3s single node
@kennyhyun
kennyhyun / index.js
Last active June 19, 2024 05:55
lamda thumbnail generator
// dependencies
var async = require('async');
var AWS = require('aws-sdk');
// Enable ImageMagick integration.
var gm = require('gm').subClass({ imageMagick: true });
var util = require('util');
var pdf2png = require('pdf2png');
pdf2png.ghostscriptPath = "/usr/bin";
// constants
option_settings:
- option_name: PORT
value: 8081
files:
"/home/ec2-user/addswap" :
mode: "000744"
owner: root
@kennyhyun
kennyhyun / index.js
Created September 6, 2016 02:04
Lamda function to convert pdf to png and generate thumbnails for images.
// dependencies
var async = require('async');
var AWS = require('aws-sdk');
// Enable ImageMagick integration.
var gm = require('gm').subClass({ imageMagick: true });
var util = require('util');
var pdf2png = require('pdf2png');
pdf2png.ghostscriptPath = "/usr/bin";
// constants
@kennyhyun
kennyhyun / MongoDB-NoVPC.template
Created September 6, 2016 01:45
downloaded template from https://docs.aws.amazon.com/quickstart/latest/mongodb/welcome.html and updated to use `t2.micro` instances and smaller GP2 volumes.
{
"AWSTemplateFormatVersion": "2016-09-06",
"Description": "(000F) Deploy MongoDB on AWS (Existing VPC)",
"Parameters": {
"ClusterReplicaSetCount": {
"Description": "Number of Replica Set Members. Choose 1 or 3",
"Type": "String",
"Default": "3",
"AllowedValues": [
"1",