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/sh | |
alarm() { | |
while :; | |
do | |
play ~/Loud_Alarm_Clock_Buzzer-Muk1984-493547174.wav | |
done | |
} | |
while :; |
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
$ events --today | |
┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑ | |
│ Thursday 2020-10-08 │ | |
├─────────────────────────────────────────────────────────────────────────────┤ | |
│ ▾ Groceries │ | |
│ ☒ Coffee │ | |
│ ▸ Readings (due: 10-20) │ | |
└─────────────────────────────────────────────────────────────────────────────┘ | |
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
union U { | |
u32: u32, | |
u64: u64, | |
f32: f32, | |
f64: f64, | |
} | |
fn main() { | |
let u32 = U { u32: 1 }; | |
let u64 = U { u64: 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
let highlights = execute('highlight') | |
let highlights = substitute(highlights, '\n\s\+', ' ', 'g') | |
let highlights = split(highlights, '\n') | |
call map(highlights, "split(v:val, '\\s\\+xxx\\s\\+')[0]") | |
for group in highlights | |
execute 'highlight' group 'NONE' | |
endfor |
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
# Common median algorithm, which averages the two middle | |
# values when needed. | |
def median(list) | |
sorted = list.sort | |
half = (list.size - 1) / 2 | |
if list.size.even? | |
(sorted[half] + sorted[half+1]) / 2.0 | |
else | |
sorted[half] | |
end |
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
//! ```cargo | |
//! [dependencies] | |
//! rand = "0.3.16" | |
//! curves = { git = "https://gitlab.com/neucrypt/curves", branch = "release" } | |
//! ``` | |
extern crate rand; | |
extern crate curves; | |
use curves::{Secp, SecpOrd, ECGroup, Ford}; | |
/// This demonstrates the math beneath a Diffe-Hellman-Merkle key exchange, and |
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 [email protected] Sat Sep 28 21:28:52 2019 | |
Date: Sat, 28 Sep 2019 12:23:51 +0800 | |
From: 0 <[email protected]> | |
Reply-To: [email protected] | |
Subject: E-017-00260_28 | |
Message-ID: <[email protected]> | |
X-Mailer: Foxmail 7, 0, 1, 91[cn] | |
Dear ask |
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
use std::io::prelude::*; | |
use std::thread; | |
use std::net::{TcpStream, TcpListener}; | |
fn network_process() { | |
let listener = TcpListener::bind("127.0.0.1:1337").unwrap(); | |
let mut handlers = Vec::new(); | |
match listener.accept() { | |
Ok((mut socket, addr)) => { |
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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="pattern"> | |
<test name="family" qual="any"> | |
<string>monospace</string> | |
</test> | |
<edit binding="strong" mode="prepend" name="family"> | |
<string>Fira Mono</string> | |
</edit> |
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
fdisk /dev/sdY | |
# create single partition type 7+bootable partition | |
mkfs.ntfs -f /dev/sdY1 | |
ms-sys -7 /dev/sdY | |
mount -o loop win7.iso /mnt/iso | |
mount /dev/sdY1 /mnt/usb | |
cp -r /mnt/iso/* /mnt/usb/ |
NewerOlder