title | author | date | url | header-includes | ||
---|---|---|---|---|---|---|
Lock-freedom without garbage collection |
Aaron Turon |
27 Aug 2015 |
|
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
curl -H 'Content-Type: text/x-markdown' https://api.github.com/markdown/raw --data-binary @FILE,md > OUTOUT.html |
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
window=0x00..... | |
opacity=30 # Something between 0 and 100 | |
xprop -id $window \ | |
-f _NET_WM_WINDOW_OPACITY 32c \ | |
-set _NET_WM_WINDOW_OPACITY $(($opacity*0xffffffff/100)) |
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 | |
exec xterm -geometry 20x10 -T Calculator -fs 25 -fa 'Droid Sans Mono' -bg '#b9c093' -fg black -e irb |
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 | |
case ARGV.size | |
when 1 | |
host = ARGV[0] | |
body = STDIN.read | |
when 2 | |
host = ARGV[0] | |
body = ARGV[1] | |
else |
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 async::fs::File; | |
use async::io::Async; | |
fn copy(src: &Path, dst: &Path) -> impl Async<()> { | |
let src = try!(File::open(src)); | |
let dst = try!(File::create(dst)); | |
// Copy a kiB at a time. | |
let mut buffer = Vec::with_capacity(1024); | |
loop { |
New versions of Gnome have a broken behavior for double-click selections. Strings like URLs can'be be selected with double-click, as usual.
The correct behavior can be restored with:
$ dconf write \
/org/gnome/terminal/legacy/profiles:/:${PROFILE}/word-char-exceptions \
'@ms ":-,.;/?%&#_=+@~·"'
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
source "https://rubygems.org" |
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::mem; | |
use std::fmt::Write; | |
fn dump_bytes<T>(val: &T) -> String { | |
let mut output = String::new(); | |
let bytes = unsafe { | |
let pointer: *const u8 = std::mem::transmute(val); | |
std::slice::from_raw_parts(pointer, std::mem::size_of::<T>()) | |
}; |
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
require "openssl" | |
require "base64" | |
access_key = ".........." | |
secret_key = "..................." | |
s3_object = "$BUCKET/$PATH" | |
expires = (Time.now + 300).to_i # 5 minutes | |
data = %[GET\n\n\n#{expires}\n/#{s3_object}] |