Skip to content

Instantly share code, notes, and snippets.

View webhacking's full-sized avatar
👻
Hyper focusing

hax0r webhacking

👻
Hyper focusing
View GitHub Profile
@webhacking
webhacking / main2.js
Created October 27, 2020 10:35
for frd
import axios from 'axios';
import cheerio from 'cheerio';
import fs from 'fs';
/**
* npm 은 package(=라이브러리) 매니저, 그래서 Node Package Manage 줄여서 npm
* npm 에서 라이브러리를 설치하려면, "npm install 라이브러리명" 을 입력하면 된다.
*/
const getMovies = async (movieNumber) => {
const response = await axios.get(`https://movie.naver.com/movie/bi/mi/basic.nhn?code=${movieNumber}`);
@webhacking
webhacking / main.ts
Created July 24, 2020 04:46
Fast brute force
import axios from 'axios';
async function generateNoRecursion(len: number, chars: string[]) {
let i;
const indices = [];
for (i = 0; i < len; ++i)
indices.push(0);
while (indices[0] < chars.length) {
let str = "";
@webhacking
webhacking / playing.md
Created July 17, 2020 06:11
playing.md

Currently Playing on {CURRENT_PLAYING_SOURCE}

{CURRENT_PLAYING_ARTISTS} - {CURRENT_PLAYING_NAME}

Albums: {CURRENT_PLAYING_ALBUM}

Last updated at {CURRENT_PLAYING_LAST_UPDATED}

@webhacking
webhacking / deploy.yml
Created May 2, 2020 04:17
serverless deploy github actions
on:
push:
branches:
- master
name: Deploy master branch
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
{
// 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 October 29, 2020 00:58
📊 Weekly development breakdown
JavaScript 43 mins ████████████████▎░░░░ 77.6%
JSON 12 mins ████▋░░░░░░░░░░░░░░░░ 22.2%
TypeScript 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.2%
Other 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.1%
@webhacking
webhacking / tsconfig.json
Created September 30, 2019 04:17
Fav tsconfig
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"typeRoots": ["./node_modules/@types", "./src/@types"],
"baseUrl": "./",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
// 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',
@webhacking
webhacking / gist:7fe4cf14210a72d7aac26bbcadcff3c0
Created September 11, 2019 14:20
3번 문제 풀이한거 ㅇㅇ
/*
지방의 수는 3 이상 100,000 이하인 자연수입니다.
각 지방에서 요청하는 예산은 1 이상 100,000 이하인 자연수입니다.
총 예산은 지방의 수 이상 1,000,000,000 이하인 자연수입니다.
*/
function solution(budgets, M) {
var answer = 0,
mid = 0,
minimum = 0,
maximum = 100000,
@webhacking
webhacking / rxjs-example-05.ts
Created January 24, 2019 04:58
RxJS Example 05
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},