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
| // 1. Sign into portal.abim.org | |
| // 2. Open dev tools | |
| // 3. Run this in the bar at the bottom | |
| (async function() { | |
| console.log("Fetching results (this could take a minute)..."); | |
| let result = (await (await fetch("https://registration.abim.org/api/v1.0/myCombinedRegistrations?pageDefinition.pageIndex=1&pageDefinition.pageSize=500", { | |
| headers: { | |
| Authorization: `Bearer ${access_token}`, |
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
| void main() { | |
| final first = A(); | |
| final second = A(b: B(c: C(d: 42))); | |
| print("test1: ${first.b?.c?.d}"); | |
| print("test2: ${second.b?.c?.d}"); | |
| print("test3: ${first.b?.c?.d ?? "it was null!"}"); | |
| } | |
| class A { |
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
| #![deny(warnings)] | |
| use std::convert::Infallible; | |
| use futures::stream::StreamExt; | |
| use hyper::service::{make_service_fn, service_fn}; | |
| use hyper::{Body, Request, Response}; | |
| use hyper::server::conn::Http; | |
| use hyper::server::Builder; | |
| use tokio::net::TcpListener; |
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
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "lldb", | |
| "request": "launch", |
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
| /** | |
| * Freeze access benches | |
| */ | |
| function freezeAccessBench(o) { | |
| return o.val | |
| } | |
| function runFreezeAccessBench(iterations) { | |
| let initial = 0; |
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
| #[proc_macro_derive(Render, attributes(TemplateName))] | |
| pub fn render(input: TokenStream) -> TokenStream { | |
| let ast: syn::DeriveInput = syn::parse(input).unwrap(); | |
| let mut template_location = None; | |
| for attr in &ast.attrs { | |
| match attr.interpret_meta().unwrap() { | |
| syn::Meta::NameValue(val) => { | |
| if val.ident.to_string() == "TemplateName" { | |
| if let syn::Lit::Str(lit) = &val.lit { | |
| template_location = Some(lit.value()); |
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
| #[proc_macro_derive(Render)] | |
| pub fn render(input: TokenStream) -> TokenStream { | |
| let ast: syn::DeriveInput = syn::parse(input).unwrap(); | |
| let structName = &ast.ident; | |
| let gen = quote! { | |
| impl Render for #name { | |
| fn render(&self) -> String { | |
| "I'm rendering!".to_owned() | |
| } |
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
| extern crate handlebars; | |
| extern crate serde; | |
| extern crate serde_json; | |
| use self::handlebars::Handlebars; | |
| use std::fs::File; | |
| use std::io::BufReader; | |
| use std::io::prelude::*; | |
| pub fn index() { |
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
| extern crate gcc; | |
| extern crate bindgen; | |
| use std::path::PathBuf; | |
| fn main() { | |
| // let bindings = bindgen::Builder::default() | |
| // .no_unstable_rust() | |
| // .header("src-cpp/pinset.hpp") | |
| // .layout_tests(false) |
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
| redis: | |
| image: redis | |
| postgres: | |
| image: postgres | |
| environment: | |
| - POSTGRES_PASSWORD=sentry | |
| - POSTGRES_USER=sentry | |
| volumes: | |
| - /var/lib/postgresql/data |
NewerOlder