View Dockerfile-github-actions-self-hosted-runner-ubuntu-20.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
SHELL ["/bin/bash", "-c"] | |
ENV RUNNER_ALLOW_RUNASROOT=true | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN sed -i 's/kr.archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list | |
RUN apt update | |
RUN apt install -y git dnsutils bison brotli bzip2 curl dbus dpkg fakeroot file flex ftp gnupg2 iproute2 iputils-ping jq lib32z1 libc++-dev libc++abi-dev libcurl4 libgbm-dev libgconf-2-4 libgtk-3-0 libsecret-1-dev libsqlite3-dev libunwind8 libxkbfile-dev libxss1 locales m4 netcat openssh-client parallel patchelf pkg-config python-is-python3 rpm rsync shellcheck sqlite3 ssh sudo telnet texinfo time tk tzdata unzip upx wget xorriso xvfb xz-utils zip zstd zsync |
View rtx3080.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rog = 'http://www.11st.co.kr/products/3126107080?trTypeCd=03&trCtgrNo=2046005' | |
const tuf = 'http://www.11st.co.kr/products/3052905270?trTypeCd=03&trCtgrNo=2046005' | |
const puppeteer = require('puppeteer') | |
const vulcan = 'http://www.11st.co.kr/products/3136907976?xfrom=&xzone=&ts=1604400314021' | |
const cases = 'http://www.11st.co.kr/products/2314458619' | |
async function main(url) { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); |
View dynamodb-inflate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const zlib = require('zlib') | |
const R = require('ramda') | |
const unzip = R.compose( | |
JSON.parse, | |
zlib.inflateSync, | |
R.partialRight(Buffer.from, ['base64']) | |
) |
View frappe-chart-usage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dataSelectHandler = (data) => { | |
console.log('data', data) | |
} | |
const graph = new Chart(ref.current, { | |
data : { | |
labels : Array(30).fill(0).map((_, i) => i + 1 + ''), | |
datasets: [ | |
{ | |
values, | |
chartType: 'line', |
View debug-line-number.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stack = new Error().stack!.split('\n').slice(3)[0] | |
const regexp = /\((\S+)\)/ | |
const match = stack.match(regexp)![1] | |
const line = `${path.basename(path.dirname(match))}/${path.basename(match)}` |
View serverless-next-exporter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import loadConfig from 'next/dist/server/config' | |
import {PHASE_EXPORT} from 'next/constants' | |
import exporter from 'next/dist/export' | |
export const exports = async (event, context, callback) => { | |
const dir = '.' | |
const result = await exporter(dir, | |
{ | |
silent: false, | |
outdir: 'out', |
View redux-immutable-class.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
state = { | |
x: 0, | |
y: 1 | |
} | |
constructor(initialState?: A) { | |
if (initialState) { | |
this.state = initialState | |
} |
View fragment.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag' | |
const FRAGMENT_REPOSITORY = gql` | |
fragment repository on Repository { | |
name | |
url | |
createdAt | |
description | |
descriptionHTML | |
labels { |
View throttle-vs-debounce.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {throttle, debounce} from 'lodash' | |
const delay = () => new Promise(r => setTimeout(r, 100)) | |
describe('throttle vs debouce', () => { | |
beforeEach(() => { | |
console.log = jest.fn() | |
}) | |
it('throttle does not guarantee about execute latest call', async (done) => { | |
const i = throttle(x => console.log(x), 300) | |
let count = 0 |
View cwlog-oneline.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// aws-cwlog trnasform script <https://www.npmjs.com/package/aws-cwlog> | |
// CloudWatch Log to oneline format eg."2018-05-25T04:41:58 log message" | |
map( | |
pipe( | |
dissoc('ingestionTime'), | |
over( | |
lensProp('timestamp'), | |
pipe( | |
x => new Date(x).toISOString(), | |
slice(0, -5), |
NewerOlder