Skip to content

Instantly share code, notes, and snippets.

👻
Hyper focusing

hax0r webhacking

👻
Hyper focusing
Block or report user

Report or block webhacking

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@webhacking
webhacking / deploy.yml
Created May 2, 2020
serverless deploy github actions
View deploy.yml
on:
push:
branches:
- master
name: Deploy master branch
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
View launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Nest debug by a@hax0r.info",
"type": "node",
"request": "launch",
@webhacking
webhacking / 📊 Weekly development breakdown
Last active May 27, 2020
📊 Weekly development breakdown
View 📊 Weekly development breakdown
TypeScript 13 hrs 53 mins █████████████▋░░░░░░░ 65.3%
Other 2 hrs 44 mins ██▋░░░░░░░░░░░░░░░░░░ 12.9%
YAML 1 hr 48 mins █▊░░░░░░░░░░░░░░░░░░░ 8.5%
JSON 57 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.5%
JavaScript 48 mins ▊░░░░░░░░░░░░░░░░░░░░ 3.8%
View tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"typeRoots": ["./node_modules/@types", "./src/@types"],
"baseUrl": "./",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
View webpack.config.js
// const webpack = require('webpack');
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const slsw = require('serverless-webpack');
const isLocal = slsw.lib.webpack.isLocal;
module.exports = {
mode: isLocal ? 'development' : 'production',
// entry: slsw.lib.entries,
entry: './src/main.ts',
View gist:7fe4cf14210a72d7aac26bbcadcff3c0
/*
지방의 수는 3 이상 100,000 이하인 자연수입니다.
각 지방에서 요청하는 예산은 1 이상 100,000 이하인 자연수입니다.
총 예산은 지방의 수 이상 1,000,000,000 이하인 자연수입니다.
*/
function solution(budgets, M) {
var answer = 0,
mid = 0,
minimum = 0,
maximum = 100000,
View rxjs-example-05.ts
import {from} from 'rxjs/internal/observable/from';
import {distinctUntilChanged} from 'rxjs/operators';
const source = [
{x: 1, y: 1},
{x: 1, y: 2},
{x: 3, y: 5},
{x: 6, y: 9},
{x: 2, y: 1},
{x: 3, y: 5},
View rxjs-example-04.ts
import {from} from 'rxjs/internal/observable/from';
import {bufferCount, count, filter} from 'rxjs/operators';
const source = 'acbqibekboabkdnopenmenuckofqamdqlvopenmenuasdqweascqwekasdcnaskdeqweqwcasdopenmenu';
const sequence$ = from(source);
const matchSequence = 'openmenu';
sequence$
.pipe(
bufferCount(matchSequence.length, 1),
View rxjs-example-03.ts
import {fromEvent} from 'rxjs/internal/observable/fromEvent';
import {interval} from 'rxjs/internal/observable/interval';
import {buffer, filter, map} from 'rxjs/operators';
let stream$ = fromEvent(document.getElementById('hit-me') as HTMLElement, 'click');
stream$
.pipe(
buffer(interval(3000)),
map((val: number[]) => val.length),
View rxjs-example-02.ts
import {fromEvent} from 'rxjs/internal/observable/fromEvent';
import {buffer, map} from 'rxjs/operators';
import {interval} from 'rxjs/internal/observable/interval';
let stream$ = fromEvent(document.getElementById('hit-me'), 'click');
stream$
.pipe(
buffer(interval(3000)),
map((val) => val.length)
)
You can’t perform that action at this time.