⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
(This is a translation of the original article in Japanese by moratorium08.)
(UPDATE (22/3/2019): Added some corrections provided by the original author.)
Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.
# Yubikey Udev Rule: running a bash script in case your Yubikey is inserted/removed | |
ACTION=="add", ENV{PRODUCT}=="1050/407/511", ENV{DEVTYPE}=="usb_device", RUN+="/usr/local/bin/pam-session-locker.sh unlock" | |
ACTION=="remove", ENV{PRODUCT}=="1050/407/511", ENV{DEVTYPE}=="usb_device", RUN+="/usr/local/bin/pam-session-locker.sh lock" |
- the default
direnv
Nix integration from projects loads a Nix shell every new terminal or every timeshell.nix
and/ordefault.nix
changes. On larger projects with a lot of Nix shell dependencies, that can cause the terminal to take more than 6 seconds to load, which significantly degrades the developer experience (DX). - when a developer garbage collects in their Nix store, often the Nix shell dependencies are deleted also which causes a slow start the next time the project’s Nix shell is requested, also degrading developer experience (DX).
- on first Nix shell load, the Nix shell is evaluated fully such that direnv dumps the environment from the spawn Nix shell process
source $stdenv/setup | |
PATH=$dpkg/bin:$PATH | |
dpkg -x $src unpacked | |
cp -r unpacked/* $out/ |
Recently I bought a Chinese Wireless Laser Presenter. I planned on using it for RevealJS presentations and it worked perfectly (as PageUP/PageDown traverse well in the 2D slides). However, in order to have more control I wanted to map the other two buttons (FullScreen, BlankScreen) to Up and Down arrows, as well as remapping the PgUp/PgDn buttons to Left and Right. Since I will most probably be using Linux when giving presentations I though it would be easy to remap them. I quickly realised how wrong I was.
The presenter worked on Wayland but remapping the keys would be mission impossible. xinput --list
didn't detect the presenter (the only way to get its EventID was to use the lower level sudo libinput-list-devices
). The next steps that I am going to present also caused errors, so Wayland is out of the question as I didn't have patience to dig through it.
As I was skimming through various StackOverflow threads and blog posts I gained a bit of knowledge on how the Linux systems work with regards to inpu
# Add these commands to your ~/.xprofile file | |
/usr/local/bin/map_logitech_r400_keys_exec & | |
/usr/local/bin/file-inotify /tmp/logitech-r400.lock /usr/local/bin/map_logitech_r400_keys_exec & |
The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.
It's as simple as downloading and installing the latest client:
"""Genetic Algorithmn Implementation | |
see: | |
http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php | |
""" | |
import random | |
class GeneticAlgorithm(object): | |
def __init__(self, genetics): | |
self.genetics = genetics | |
pass |