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
name: Cache (v2) | |
description: > | |
Cache files onto S3 bucket. It has 3 steps: | |
1. It tries to restore the cache using the given key. | |
If the caches hits, exit. | |
2. It runs the given script using shell, if the cache missed in step 1. | |
3. It saves to the cache after the script. | |
inputs: | |
s3-bucket: |
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 errorPromise() { | |
return new Promise((_resolve, _reject) => { | |
console.log('error coming up'); | |
throw new Error('oops'); | |
}); | |
} | |
function okPromise() { | |
return new Promise((_resolve, _reject) => { | |
console.log('ok'); |
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
plugins { | |
`java-library` | |
id("kotlin-multiplatform") version "1.3.21" | |
} | |
allprojects { | |
group = "xxx" | |
version = "1.0.0-SNAPSHOT" | |
} |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <sys/stat.h> | |
#include <sys/time.h> | |
#include <lmdb.h> |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <sys/stat.h> | |
#include <sys/time.h> | |
#include <lmdb.h> |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <sys/stat.h> | |
#include <sys/time.h> | |
#include <lmdb.h> |
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 HList { | |
static hnil(): HNil { | |
return HNil.instance; | |
} | |
static hcons<V, Next extends HList>(value: V, next: Next) { | |
return new HCons<V, Next>(value, next); | |
} | |
} | |
class HNil extends HList { | |
static readonly instance = new HNil(); |
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 invertTable(t) | |
local res = {} | |
for k, v in pairs(t) do | |
res[v] = k | |
end | |
return res | |
end | |
local capsMap = { | |
-- Arrow keys |
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
{ | |
val $u: `package`.this.universe.type = `package`.this.universe; | |
val $m: $u.Mirror = `package`.this.universe.runtimeMirror(this.getClass.getClassLoader); | |
$u.Expr.apply($m, { | |
final class $treecreator1 extends TreeCreator { | |
def apply[U >: Nothing <: Universe with Singleton]($m$untyped: Mirror[U]): (U)#Tree = { | |
val $u: U = $m$untyped.universe; | |
val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror]; | |
$u.Literal($u.Constant(3)) | |
} |
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 javac='javac -J-Dfile.encoding=UTF8' | |
alias java='java -Dfile.encoding=UTF8' # What the fuck is this!!! Why should I do this!!! How stupid is JAVA!!! |