Skip to content

Instantly share code, notes, and snippets.

View SeaniaTwix's full-sized avatar
💭
Working

Seania Twix SeaniaTwix

💭
Working
View GitHub Profile
#!/usr/bin/env fish
set killpid
string match -rq '\\d+\\s+(?<killpid>\\d+).+CAReportingService' -- (ps -ef)
if test (string length $killpid) -gt 1
#sudo kill -9 $killpid
echo $killpid
end
cc = vcc
# Configuration for the MS Visual Studio C/C++ compiler:
vcc.exe = "cl.exe"
vcc.linkerexe = "cl.exe"
# set the options for specific platforms:
vcc.options.always = "/nologo /EHsc"
vcc.options.linker = "/nologo /Zi /F33554432" # set the stack size to 32 MiB
proc toByteArrayPtr[L, T](i: T): ptr array[L, uint8] =
result = array[L, uint8].create()
for n in 0..<sizeof(i):
var
j = i
v = cast[ptr uint8](addr(j) + n)
result[n] = v[]
when isMainModule:
discard toByteArrayPtr[8, int32](123)
export const world = 'world'
import { world } from './world.js'
function something_happen(hello) {
print(`${hello} ${world}`)
}
something_happen('inside: hello')
function (arg1) {
something_happen(arg1)
fun load(path: string) {
val ctx = Context.newBuilder("js").allowAllAccess(true).build()
val file = File(path)
val source = Source.newBuilder(JavaScriptLanguage.ID, file)
.mimeType("application/javascript+module").build()
val v = ctx.eval(source)
v.execute("outside: hello")
}
@SeaniaTwix
SeaniaTwix / range.js
Created January 22, 2020 05:48
ranged array
function range(start, end) {
const n = end - start
return Array.from([...Array(n + 1).keys()], i => i + start)
}

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a