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) { |
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
<plugin> | |
<groupId>com.diffplug.spotless</groupId> | |
<artifactId>spotless-maven-plugin</artifactId> | |
<version>2.24.0</version> | |
<configuration> | |
<formats> | |
<format> | |
<includes> | |
<include>*.md</include> | |
<include>.gitignore</include> |
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
'use strict'; | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf-8'); | |
let inputString = ''; | |
let currentLine = 0; | |
process.stdin.on('data', inputStdin => { | |
inputString += inputStdin; |
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
@baseUrl = {{$dotenv SERVICE_API_ENDPOINT}} | |
@accessToken = {{$dotenv SERVICE_API_ACCESS_TOKEN}} | |
### Health-check | |
GET {{baseUrl}}/health | |
### Media | |
### Create media upload url | |
## This endpoint return a JSON { data : "signedUrl" } |
NewerOlder