$ gcc -O3 -Wall -Wextra upper.c -o upper-c
$ rustc -O upper.rs -o upper-rs
$ find /usr/bin/ -type f -exec strings {} + > /tmp/ascii
$ tr [[:lower:]] [[:upper:]] < /tmp/ascii | md5sum
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 | |
# | |
# Use the list from http://a3f.at/lists/linkers to build a single HTML file | |
# with all posts about linkers in https://www.airs.com/blog/. | |
require "net/http" | |
require "nokogiri" | |
# Index based on http://a3f.at/lists/linkers | |
INDEX = [ |
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 <poll.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <termios.h> | |
#include <unistd.h> | |
struct termios initial_term_params; | |
// Check if both stdin and stdout are TTYs. | |
void check_stdio() { |
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/ruby | |
256.times do |color| | |
if color < 7 || (color > 15 && (color - 16) % 36 < 18) | |
fg = 231 | |
else | |
fg = 0 | |
end | |
print "\e[38;5;#{fg};48;5;#{color}m #{color.to_s.rjust(3)} \e[m" |
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
" When the cursor is hold on a word, that word is highlighted. | |
" When the cursor is moving, the highlight is hidden | |
set updatetime=300 | |
au! CursorMoved * set nohlsearch | |
au! CursorHold * set hlsearch | let @/='\<'.expand("<cword>").'\>' | |
set hlsearch |
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 | |
let data = "aaa 11-22 bbb 33-44 ccc" | |
let regex = try! NSRegularExpression(pattern: #"\d+-\d+"#) | |
let range = NSRange(data.startIndex..., in: data) | |
regex.enumerateMatches(in: data, options: [], range: range) { (match, _, _) in | |
print(data.substring(with: match!.range)) | |
} |
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::arch::x86_64 as S; | |
fn main() { | |
let data: &[u8; 16] = b"1e0b98cfa67ebe20"; | |
let pattern: &[u8; 16] = b"b98............."; | |
let mask; | |
unsafe { | |
let v0 = S::_mm_loadu_si128(data.as_ptr().cast()); |
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
convert input.png -colorspace hsl -channel lightness -negate output.png |
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
# Simple web server | |
# Use N_ envvar to identify the process | |
run lambda {|env| | |
[ 200, {}, "Ok @ #{ENV["N_"]}"] | |
} |
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 | |
ffmpeg -ss 4:00:00 -i INPUT.webm -filter:a volume=0.5 half-volume.webm | |
ffmpeg -i INPUT.webm -t 4:00:00 -c copy start.webm | |
cat > files <<EOF | |
file 'start.webm' | |
file 'half-volume.webm' | |
EOF |