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 ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "syscall" | |
| ) | |
| func main() { |
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 java.time.Instant; | |
| class ThreadT extends Thread { | |
| int waitTime = 0; | |
| ThreadT(int _waitTime){ | |
| this.waitTime = _waitTime; | |
| } | |
| public void run(){ | |
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 ( | |
| "encoding/binary" | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "time" | |
| "github.com/gordonklaus/portaudio" |
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
| (function () { | |
| 'use strict'; | |
| const delay = ms => new Promise(res => setTimeout(res, ms)); | |
| function waitForElm(doc, selector) { | |
| return new Promise(resolve => { | |
| if (doc.querySelector(selector)) { | |
| return resolve(doc.querySelector(selector)); | |
| } |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>modal</title> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/css/bootstrap.min.css" /> | |
| </head> | |
| <body></body> |
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
| function dump(o) | |
| if type(o) == 'table' then | |
| local s = '{ ' | |
| for k,v in pairs(o) do | |
| if type(k) ~= 'number' then k = '"'..k..'"' end | |
| s = s .. '['..k..'] = ' .. dump(v) .. ',' | |
| end | |
| return s .. '} ' | |
| else |
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
| function setCookie(name, value, days) { | |
| let expires = ''; | |
| if (days) { | |
| let date = new Date(); | |
| date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); | |
| expires = '; expires=' + date.toUTCString(); | |
| } | |
| document.cookie = name + '=' + (value || '') + expires + '; path=/'; | |
| } |
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
| alias whichcluster='kubectl config current-context' | |
| # [Functions] | |
| clusteradmin() { | |
| ibmcloud ks cluster config --cluster "$1" --admin | |
| } | |
| # [/Functions] |
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
| version: "3.2" | |
| services: | |
| nginx: | |
| image: nginx:latest | |
| volumes: | |
| - "nfs-data:/etc/nginx/nginx.conf" | |
| volumes: | |
| nfs-data: |
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
| function callNext(i) | |
| { | |
| const random = Math.random(); | |
| const random_boolean = random < 0.5 | |
| const msg = new SpeechSynthesisUtterance(random_boolean ? 'Left' : 'Right'); | |
| window.speechSynthesis.speak(msg); | |
| if(i == 10) | |
| return; |