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
# Append this to `~/.profile` | |
# Swap `Alt` and `Win` | |
setxkbmap -option 'altwin:swap_alt_win' | |
# Map `Caps` to `Escape` and `Control` | |
setxkbmap -option 'caps:ctrl_modifier' | |
xcape -e 'Caps_Lock=Escape' -t 300 | |
# Map left `Ctrl` to `F12` | |
xcape -e 'Control_L=F12' | |
# Map `Ctrl+p/n/f/b` to arrow key |
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 | |
if [ -z "$SS_PASSWORD" ]; then | |
SS_PASSWORD="SET_YOUR_PASSWORD_HERE" | |
fi | |
if [ -z "$SS_METHOD" ]; then | |
SS_METHOD="aes-256-cfb" | |
fi | |
if [ -z "$SS_SERVER_PORT" ]; then | |
SS_SERVER_PORT=995 | |
fi |
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
{ | |
"disk_low_priority" : true, | |
"lan_encrypt_data" : false, | |
"rate_limit_local_peers" : false, | |
"folder_rescan_interval" : 600, | |
"folder_defaults.delete_to_trash" : true, | |
"folder_defaults.use_dht" : false, | |
"folder_defaults.use_lan_broadcast" : true, | |
"folder_defaults.use_relay" : true, | |
"folder_defaults.use_tracker" : true, |
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 python | |
# O(2^n), O(n) | |
def fib1(n): | |
if n == 0: | |
return 0 | |
elif n == 1: | |
return 1 | |
return fib1(n-1) + fib1(n-2) |
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
*.beam |
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 <stdio.h> | |
#include <assert.h> | |
#include <uv.h> | |
void after_write(uv_write_t *req, int status) | |
{ | |
printf("after_write\n"); | |
assert(!status); | |
} |
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
/* zpipe.c: example of proper use of zlib's inflate() and deflate() | |
Not copyrighted -- provided to the public domain | |
Version 1.4 11 December 2005 Mark Adler */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include "zlib.h" |
NewerOlder