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
// https://corsproxy.io/ | |
const fetch_base = globalThis.fetch; | |
const fetch_next: typeof fetch_base = async (url, init) => { | |
if (typeof url === "string") { | |
const urlObj = new URL(url); | |
if (urlObj.hostname === "www.youtube.com") { | |
const proxyUrl = `https://corsproxy.io/?${encodeURIComponent(url)}`; | |
return await fetch_base(proxyUrl, init); | |
} | |
} |
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
{ | |
"schemes": [], | |
"swagger": "2.0", | |
"info": { | |
"description": "PufferPanel API interface for both the panel and daemon. Endpoints starting with /daemon or /proxy are for nodes.", | |
"title": "PufferPanel API", | |
"contact": { | |
"name": "PufferPanel", | |
"url": "https://pufferpanel.com" |
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 fs = require('fs') | |
function read_stdin(): string { | |
return fs.readFileSync(0).toString(); | |
} | |
const chunk = read_stdin(); | |
const numbers = chunk.split('\n')[0].split(' ').map(x => parseInt(x, 10)); | |
const [a, b] = numbers; | |
const c = a + b; | |
process.stdout.write(c.toString()); |
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 yup = require('yup'); | |
import express from 'express'; | |
import fetch, { Response } from 'node-fetch'; | |
type Method = 'get' | 'post' | 'delete' | 'put'; | |
interface Api<Req, Resp> { | |
name: string; | |
method: Method; | |
// url = resource + page |
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 { Factory } from 'rosie'; | |
import { NonFunctionKeys } from 'utility-types'; | |
// maybe typeorm entity | |
class Entity { | |
constructor() { | |
this.a = 0; | |
this.b = null; | |
} | |
public a: number; |
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
/** | |
* test | |
* curl "http://127.0.0.1:3000/?id=1" & curl "http://127.0.0.1:3000/?id=2" | |
*/ | |
const express = require('express'); | |
const delay = require('delay'); | |
const { getNamespace, createNamespace } = require('cls-hooked'); | |
const NSID = 'writer'; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Runtime.Serialization; | |
using System.Runtime.Serialization.Json; | |
using System.Text; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
using System.Net.Http; | |
using System.Net; |
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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Net.Http; | |
using System.Runtime.Serialization; | |
using System.Runtime.Serialization.Json; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace httpclient |
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
/* | |
오늘의 코딩 퀴즈 | |
숫자를 기수로 변환하기 | |
1 => 일 | |
73 => 칠십삼 | |
598 => 오백구십팔 | |
1920 => 일천구백이십 |
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
SHOW VARIABLES LIKE '%time_zone%' |
NewerOlder