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
#!/bin/sh | |
for i in {1..20} | |
do | |
echo "This is message $i" | |
sleep $i | |
done |
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 ( | |
"math/rand" | |
) | |
var chars = []rune(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890") | |
func randString(n int) string { | |
b := make([]rune, n) | |
for i := range b { | |
b[i] = chars[rand.Intn(len(chars))] |
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 main | |
import ( | |
"bytes" | |
"compress/flate" | |
"compress/gzip" | |
"compress/zlib" | |
"errors" | |
"fmt" | |
"io/ioutil" |
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
Dim byteArray As Byte() = System.Text.Encoding.UTF8.GetBytes("{ | |
""totalAmount"": { | |
""currency"": ""PHP"", | |
""value"": ""3210.99"" | |
}, | |
""buyer"": { | |
""firstName"": ""Visual"", | |
""lastName"": ""Basic"" | |
}, | |
""items"": [ |
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
const fn1 = (a, b, x) => new Promise((resolve, reject) => { | |
if (x) resolve('resolve x'); | |
console.log('after x'); | |
if (a) reject('reject a'); | |
console.log('after a'); | |
if (b) reject('reject b'); | |
console.log('after b'); | |
resolve('resolve c'); | |
}); | |
const fn2 = (a, b, x) => new Promise((resolve, reject) => { |