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 <stdint.h> | |
int rdrand(uint32_t *out) { | |
char rc; | |
unsigned int val; | |
__asm__ volatile( | |
"rdrand %0 ; setc %1" | |
: "=r" (val), "=qm" (rc) |
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 | |
# USAGE: docker run -t -i --rm -v $PWD:/out ubuntu:16.04 /out/build.sh | |
set -eu | |
# Install | |
install_packages() { | |
apt-get update && apt-get upgrade -yy |
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
#!/usr/bin/env ruby | |
require 'logger' | |
require 'optparse' | |
require 'rubygems' | |
require 'net/http' | |
require 'net/https' | |
require 'json' | |
@log = Logger.new(STDERR) |
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
#!/usr/bin/env python | |
import sys | |
from SocketServer import ThreadingMixIn, ForkingMixIn | |
from BaseHTTPServer import HTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
class ThreadingSimpleServer(ThreadingMixIn, HTTPServer): | |
pass | |
class ForkingSimpleServer(ForkingMixIn, HTTPServer): |
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 | |
set -euo pipefail | |
main() { | |
local url | |
url="$(jq -rc .response.data.url < "$1")" | |
if [[ -z "$url" ]]; then | |
echo "EMPTY: $1" | |
return |
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
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "l-jz8T47k" | |
}, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "thresholds" |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import base64 | |
import ctypes | |
import json | |
import subprocess | |
import sys | |
import xml.etree.ElementTree as ET |
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 | |
set -eu | |
die() { | |
echo "$1" >&2 | |
exit 1 | |
} |
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 <string.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <Security/Security.h> | |
// Compile with: | |
// gcc -o ourpath -framework CoreFoundation -framework Security main.c |
OlderNewer