Skip to content

Instantly share code, notes, and snippets.

View naramdash's full-sized avatar
🚲
Keep Studying & Working

김주호 naramdash

🚲
Keep Studying & Working
View GitHub Profile
@naramdash
naramdash / Vagrantfile
Last active October 17, 2021 15:56
Vagrantfile sample
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.define "control-plane" do |config|
config.vm.box = "generic/rocky8"
@naramdash
naramdash / fsharpjobs.md
Created August 27, 2021 02:05 — forked from swlaschin/fsharpjobs.md
My suggestions on how to look for F# jobs

How to find F# jobs

People often ask me how to find F# jobs. I don't have any special connections to companies using F#, and I don't have any special tricks either. I wish I did!

So, given that, here's my take on F# jobs.

Job hunting

For job hunting my suggestions are:

@naramdash
naramdash / sliceToSmallArray.js
Last active September 17, 2020 12:34
split array to small array with maxLength
function sliceToSmallArray(acc, arr, maxLength) {
if (arr.length === 0) return acc
if (arr.length <= maxLength) return [...acc, arr]
return sliceToSmallArray([...acc, arr.slice(0, maxLength)], arr.slice(maxLength), maxLength)
}
@naramdash
naramdash / aws_config.js
Last active August 20, 2020 03:47
Upload image to S3 in React + Typescript
import Amplify, { Auth, Storage } from 'aws-amplify';
Amplify.configure({
Auth: {
identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab', //REQUIRED - Amazon Cognito Identity Pool ID
region: 'XX-XXXX-X', // REQUIRED - Amazon Cognito Region
userPoolId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito User Pool ID
userPoolWebClientId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito Web Client ID
},
Storage: {
@naramdash
naramdash / Pagination.tsx
Last active July 7, 2020 10:23
React Material-UI Pagination Component with Displayed-Page-Range style using Typescript & Material-UI
import React, { useMemo, FC } from 'react'
import { Box, Button, makeStyles } from '@material-ui/core'
import { SkipPrevious, SkipNext, NavigateBefore, NavigateNext } from '@material-ui/icons'
import classnames from 'classnames'
function range(start: number, stop: number, step: number) {
return Array.from({ length: (stop - start) / step + 1 }, (_, i) => start + i * step)
}
interface PaginationParams {
@naramdash
naramdash / DIY_check_token_value.js
Last active July 2, 2020 05:29
AWS Amplify refreshSession (id: new, access: new, refresh: same)
async function refresh() {
const { idToken, accessToken, refreshToken } = await Auth.currentSession();
console.log('id: ', idToken.jwtToken);
console.log();
console.log('access: ', accessToken.jwtToken);
console.log();
console.log('refresh: ', refreshToken.token);
console.log();
try {
@naramdash
naramdash / Pagination.js
Last active July 7, 2020 10:23
React Fluent UI Pagination using Javascript & Fluent-UI
import React, { useMemo } from 'react';
import {
Stack,
Pivot,
PivotItem,
PivotLinkFormat,
IconButton,
} from '@fluentui/react';
function range(start, stop, step) {