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
{ | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Current TS file", | |
"runtimeArgs": ["-r", "ts-node/register"], | |
"args": ["${file}"] | |
}, | |
{ |
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
#!/usr/bin/env node | |
const fs = require("fs"); | |
const buildAt = new Date().toISOString(); | |
const buildEnv = process.env.ENVIRONMENT; | |
main(); | |
function main() { |
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
// npm i -S pino | |
// npm i -D pino-pretty | |
import pino from "pino"; | |
const { LOG_LEVEL = "debug", APP_NAME = "Web" } = process.env; | |
const isProduction = process.env.NODE_ENV === "production"; | |
const logger = pino({ | |
name: APP_NAME, |
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
// contracts/GLDToken.sol | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
contract ERC20_Token_Sample is ERC20, ERC20Burnable { | |
constructor() ERC20("ERC20 Token Sample1", "Sample 1") { |
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 Koa, { Context } from "koa"; | |
import bodyParser from "@koa/bodyparser"; | |
import registerRoutes from "./routers"; | |
import Jwt from "koa-jwt"; | |
const { THIRD_PARTY_APP_JWT_SECRET = "" } = process.env; | |
const koaApp = new Koa(); | |
koaApp.use(bodyParser()); | |
koaApp.use(async (ctx: Context, next) => { |
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. Converting Arrays to Strings | |
var fruits = ["Banana", "Orange", "Apple", "Mango"]; | |
console.log(fruits.valueOf()); | |
//output : Banana,Orange,Apple,Mango | |
//For JavaScript arrays, valueOf() and toString() are equal. | |
// join() method joins array elements into a string. | |
var fruits = ["Banana", "Orange", "Apple", "Mango"]; |
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
ps aux | grep -i 3000 | grep -v grep | awk {'print $2'} | xargs kill -9 |
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
INSTANCE_NAME=nucleus-jumphost-570 | |
PORT=8080 | |
REGION=us-west4 | |
ZONE=us-west4-a | |
FIREWALL_RULE=allow-tcp-rule-698 | |
# setup | |
gcloud config set compute/zone $ZONE | |
gcloud config set compute/region $REGION |
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
var arr= Array.prototype.slice.call(document.querySelectorAll('.UFILikeLink')); | |
var index = 0; | |
setInterval(function(){ | |
var a = arr.shift(); | |
if(a.className.indexOf("UFILinkBright") < 0){ | |
console.log("like : ",++index); | |
a.click(); | |
} | |
if(arr.length == 0){ | |
document.querySelectorAll('a.UFIPagerLink')[0].click(); |
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
package com.pragmatists.blog.events.application; | |
import java.util.Random; | |
import java.util.function.Function; | |
import java.util.function.Supplier; | |
public class HOFSampleToro { | |
public static void main(String[] args) { |
NewerOlder