Skip to content

Instantly share code, notes, and snippets.

View haze's full-sized avatar
💭
If it's not a challenge I’m not interested

haze

💭
If it's not a challenge I’m not interested
View GitHub Profile
<body>
<table>
<tr>
<td class="line-number">1</td>
<td class="line">
<span style="color: #5f00d7">function</span>
<span style="color: #005fd7">sum</span><span style="color: #4e4e4e">(</span
><span style="text-decoration: underline;">a</span><span style="color: #4e4e4e">,</span>
<span style="text-decoration: underline;">b</span><span style="color: #4e4e4e">)</span>
<span style="color: #4e4e4e">{</span>
pub fn main() anyerror!void {
@import("std").log.info("x={}", .{try foo(23)});
}
fn foo(x: usize) !?Union {
if (x > 5) return Union.x;
return bar();
}
fn bar() !?Union {
use std::collections::HashMap;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
enum BaseRule {
Digit,
Upper,
Lower,
Special,
}
Apple clang version 12.0.0 (clang-1200.0.22.7)
Target: x86_64-apple-darwin20.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "x86_64-apple-macosx10.16.0" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-Werror=implicit-function-declaration" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "test.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-mframe-pointer=all" "-fno-strict-return" "-fno-rounding-math" "-masm-verbose" "-munwind-tables" "-target-sdk-version=10.16" "-target-cpu" "penryn" "-dwarf-column-info" "-debugger-tuning=lldb" "-target-linker-version" "607.2" "-resource-dir" "/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0" "-isysroot" "/Applications/X
🌞 Morning 92 commits ███▊░░░░░░░░░░░░░░░░░ 18.1%
🌆 Daytime 185 commits ███████▋░░░░░░░░░░░░░ 36.4%
🌃 Evening 124 commits █████▏░░░░░░░░░░░░░░░ 24.4%
🌙 Night 107 commits ████▍░░░░░░░░░░░░░░░░ 21.1%
import {walk, ensureDir} from "https://deno.land/std/fs/mod.ts";
import {readFileStr} from 'https://deno.land/std/fs/read_file_str.ts';
const inspect = false;
interface CloneResult {sshURL: string, exitCode: number};
const repositories = async (name: string): Promise<any[]> => {
return await (await fetch(`https://api.github.com/users/${name}/repos`)).json();
};
@haze
haze / shitpost.go
Created September 20, 2019 18:41
shitpost.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
{"description":"Our first update has arrived! 🎉","color":9688585,"timestamp":"2019-03-07T15:38:40.011Z","author":{"name":"Blast — Announcement","icon_url":"https://images-ext-1.discordapp.net/external/QVB95mBD1daN7C6-w7OfLawdWillAa5haHBnVoElhhY/https/cdn.discordapp.com/icons/506219319030448128/342d618bf1cb75d7ce71c44a0904b437.webp"},"footer":{"text":"PS: spamming in channels won't give you XP any faster."},"fields":[{"name":"About","value":"As some of you may have noticed, we have made some changes to the Discord and cleaned it up a bit. We have been preparing for an update, which are **levels**. \n\nNow, you may be asking; what are these levels you're talking about?\nOne can obtain levels by chatting in our channels. The levels each have a role associated with them, these roles give you access to private channels.\n\nOur private channels will also be used for special events. \n\nOne can also become a **Blast** beta-tester, you can read about the requirements below."},{"name":"Requirements","value":"*These ar
@haze
haze / keybase.md
Created October 20, 2018 14:06
Keybase Proof

Keybase proof

I hereby claim:

  • I am hvze on github.
  • I am x86 (https://keybase.io/x86) on keybase.
  • I have a public key ASCkcYqd4M7UR5M_cyED56dznS1zTeU6BAq6YjlUjowOJQo

To claim this, I am signing this object: