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] | |
name = "testing" | |
version = "0.1.0" | |
authors = ["Ravi Shankar <[email protected]>"] | |
edition = "2018" | |
[dependencies] | |
actix-web = "2.0" | |
serde = "1.0" | |
uuid = { version = "0.8", features = ["serde", "v4"] } |
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] | |
name = "cert-check" | |
version = "0.1.0" | |
authors = ["Ravi Shankar <[email protected]>"] | |
edition = "2018" | |
[dependencies] | |
futures = "0.1" | |
rustls = "0.14" | |
tokio-core = "0.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
import Foundation | |
var args = CommandLine.arguments | |
let name = args.removeFirst() | |
func printUsage() { | |
print( | |
"Usage: \(name) [FILE] -d DELIM [-o OUT_FILE]" | |
) | |
} |
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
FROM ruby:2.5-alpine | |
EXPOSE 4567 | |
RUN apk add --update nodejs g++ make git | |
RUN git clone https://github.com/lord/slate /usr/src/app | |
WORKDIR /usr/src/app | |
RUN bundle install |
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
public struct Object: Codable { | |
let context: String | |
} | |
public struct Activity: Codable { | |
var base: Object | |
var hello: String |
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
#[macro_use] extern crate derive_error; | |
extern crate futures; | |
extern crate hyper; | |
extern crate hyper_rustls; | |
extern crate tokio_core; | |
use futures::{Future, Sink, Stream, future}; | |
use futures::sync::mpsc::{self, Sender}; | |
use tokio_core::reactor::Core; | |
use hyper::client::{Client, HttpConnector}; |
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
0: Type map 2024540 | |
0: Bucket heads and tails 2024540 | |
0: Approx SA 3001064 | |
0: Sorting 3001064 | |
0: LMS bytes 2879128 | |
0: Summary Index 2884012 | |
0: Mapping for recursion 2252000 | |
1: Type map 2270432 | |
1: Bucket heads and tails 2270656 | |
1: Approx SA 2557592 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
overflow: hidden; | |
} | |
.bubble { | |
position: absolute; |
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
# Characters were robbed from http://www.unicode.org/Public/security/revision-06/confusables.txt | |
# and filtered using Daniel's awesome suggestion for 'printable' ASCII replacements (https://github.com/rust-lang/rust/issues/25957#issuecomment-107812945) | |
# egrep -v '^[ ]*#' confusables.txt | egrep -v '^[ ]+$|^$' | egrep '00(2[1-9A-F]|3[A-F]|40|5[BCDF]|7[BCD])' | egrep ';[^0-9A-F]00.. ;' | egrep -v '^00' > CONFUSABLES.txt | |
def const_array_of_strings(name, type_spec = "&'static str"): | |
return [unicode("const %s: &'static [%s] = &[" % (name, type_spec))] | |
arrays = [const_array_of_strings('UNICODE_ARRAY', "(char, &'static str, char)"), | |
const_array_of_strings('ASCII_ARRAY', "(char, &'static str)")] | |
lengths = map(lambda arr: len(arr[0]), arrays) |
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
$ python -c "from python import tidy; import cProfile; cProfile.run('tidy.scan()', sort = 'time')" > ~/Desktop/tidy_profile.log | |
21964378 function calls (21757559 primitive calls) in 936.595 seconds | |
Ordered by: internal time | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1 544.370 544.370 544.370 544.370 {posix.waitpid} | |
282745 241.367 0.001 241.367 0.001 {posix.stat} | |
19007 109.301 0.006 109.301 0.006 {posix.listdir} |
NewerOlder