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 ( | |
"fmt" | |
"os" | |
"os/signal" | |
"time" | |
"golang.org/x/net/context" | |
) |
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
#include <math.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <gmp.h> | |
#include <mpfr.h> | |
int ilog2(uint64_t x) { return 63 - __builtin_clzll(x); } |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <gmp.h> | |
#include <mpfr.h> | |
int main (void) | |
{ | |
mpfr_t x, y; |
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 ( | |
"fmt" | |
"unsafe" | |
) | |
/* | |
void modifyN(void* p, int n) { | |
*(int *)p = n; |
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 ( | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"fmt" | |
"log" | |
"golang.org/x/net/idna" |
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 | |
# apt-key-add - Alternative script for "apt-key add" which is deprecated in Ubuntu 20.10 | |
# | |
# example: | |
# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key-add - nodesource | |
# instead of | |
# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add - | |
# | |
set -e | |
if [ $# -ne 2 -o $UID -ne 0 ]; then |
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
<script> | |
window.onerror = () => alert("Hello, World!"); | |
function hello(x) { | |
if(typeof x === 'undefined') { | |
alert(x.f()); | |
} | |
} | |
hello(); | |
</script> |
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 std = @import("std"); | |
const testing = std.testing; | |
pub const Limb = u64; | |
pub const Metadata = packed struct { | |
// positive is set as true for n >= 0, false for n < 0. | |
positive: bool, | |
len: u63, | |
}; |
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 std = @import("std"); | |
const Context = struct { | |
canceled: bool = false, | |
err: [4096]u8 = undefined, | |
pub fn formatErr(self: *Context, comptime fmt: []const u8, args: anytype) error{NoSpaceLeft}!void { | |
var fbs = std.io.fixedBufferStream(self.err[0..]); | |
var writer = fbs.writer(); | |
try std.fmt.format(writer, fmt, args); |
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 std = @import("std"); | |
const expect = std.testing.expect; | |
const cell = struct { | |
v1: ?*Variant, | |
v2: ?*Variant, | |
}; | |
const Variant = union(enum) { | |
int: i32, |