eval "$(ssh-agent)"
ssh-add <key>
This file contains hidden or 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 main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"os/exec" | |
"time" |
This file contains hidden or 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
const express = require('express') | |
const app = express() | |
const port = 3000 | |
const host = '192.168.10.112' | |
const realm = 'protected' | |
const templ = fillTempl`<html> | |
<head><title>${0}</title></head> | |
<body><h1>${1}</h1></body> | |
</html>` |
This file contains hidden or 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
// extracts x and y from a CSS polygon clip-path string | |
function extractPoints(str) { | |
// 'polygon(' - starts from index 8 | |
// ends at length-1 | |
let s = str.substring(8, str.length - 1) | |
let pointStrs = s.split(',').map(p => p.trim()) | |
return pointStrs.map(str => { | |
let percentages = str.split(' ') | |
return { | |
x: excludePercentSign(percentages[0]), |
This file contains hidden or 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
// Turn an array-like object into an array | |
let nodeList = document.querySelectorAll('div') // an array-like object | |
Array.prototype.slice.call(nodeList) |
This file contains hidden or 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
// xkool 22.06.18 | |
package main | |
import "fmt" | |
type Node struct { | |
Data int | |
Left, Right *Node | |
} |
This file contains hidden or 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
// Override webkit browsers' default scrollbar styles | |
::-webkit-scrollbar { | |
width: 12px; | |
height: 12px; | |
} | |
::-webkit-scrollbar-button { | |
height: 0; | |
width: 0; |
This file contains hidden or 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'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const request = require('request'); | |
const opts = { | |
url: '', | |
qs: { | |
}, |
This file contains hidden or 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 reactor.core.publisher.Flux; | |
import java.time.Duration; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ExecutionException; | |
public class FluxHandleExample { | |
public static void main(String[] args) throws InterruptedException, ExecutionException { | |
CompletableFuture<Boolean> completableFuture = new CompletableFuture<>(); |
This file contains hidden or 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
class PlayUtterance extends HTMLElement { | |
constructor() { | |
super(); | |
} | |
connectedCallback() { | |
const shadow = this.attachShadow({ mode: "open" }); | |
const flx = document.createElement("div"); | |
const src = this.getAttribute("src"); | |
const lab = this.getAttribute("label"); |