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
func spewJSON(fn, data string) { | |
w, err := os.Create(fn) | |
if err != nil { | |
panic(err) | |
} | |
defer w.Close() | |
var v any | |
json.Unmarshal([]byte(data), &v) | |
e := json.NewEncoder(w) |
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
/** | |
* Chunkify | |
* Google Chrome Speech Synthesis Chunking Pattern | |
* Fixes inconsistencies with speaking long texts in speechUtterance objects | |
* Licensed under the MIT License | |
* | |
* Peter Woolley and Brett Zamir | |
* https://gist.github.com/woollsta/2d146f13878a301b36d7 | |
* Modified by Haaris for bug fixes | |
* https://gist.github.com/hsed/ef4a2d17f76983588cb6d2a11d4566d6 |
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
program exec_kbd_test; | |
uses sysutils; | |
begin | |
SysUtils.ExecuteProcess('kbd-test', '', []); | |
end. |
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
{$mode TP} | |
program test; | |
uses baseunix,strings; | |
const vcs_device:shortint=-1; | |
function try_grab_vcsa_in_path(path:Pchar;len:cardinal):boolean; | |
const grab_vcsa='/grab_vcsa'; | |
grab_vcsa_s:array[1..length(grab_vcsa)] of char=grab_vcsa; |
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
{$mode TP} | |
program test; | |
uses keyboard; | |
begin | |
writeln('Hello World.'); | |
end. |
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/bash | |
# Documentation that helped with this: | |
# https://github.com/luebken/serverless-the-manual-way | |
# Status: | |
# https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1 | |
# See: https://developer.twitter.com/en/apps/16043135 | |
TWITTER_CONSUMER_KEY=secret | |
TWITTER_CONSUMER_SECRET=secret |
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
/* rewritten example of JsonWebToken example | |
* from https://gist.github.com/thealexcons/4ecc09d50e6b9b3ff4e2408e910beb22 | |
* Keys are generated and packed to PEM-format at server start | |
* Plus some fixes and refactors | |
* | |
* My respect to thealexcons | |
*/ | |
package main | |
import ( |
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
*> Copyright (C) 2006 Micro Focus (IP) Limited. | |
*> All rights reserved. | |
*> | |
*> Michael Wojcik, Micro Focus International Ltd | |
*> April 2006 | |
$set ans85 mf sourceformat"free" align"8" notrickle opt"4" | |
$set noalter comp nocheck nocheckdiv noqualproc noseg notrunc | |
$set scheduler |
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
source "https://rubygems.org" | |
gem 'mmap', git: 'https://github.com/lyda/mmap.git', :branch => 'non-global-version' |
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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
NewerOlder