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" |
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
*.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
#!/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
{ | |
"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
#!/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
# 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
.highlight .hll { background-color: #ffffcc } | |
.highlight .c { color: #808080 } /* Comment */ | |
.highlight .err { color: #F00000; background-color: #F0A0A0 } /* Error */ | |
.highlight .k { color: #008000; font-weight: bold } /* Keyword */ | |
.highlight .o { color: #303030 } /* Operator */ | |
.highlight .cm { color: #808080 } /* Comment.Multiline */ | |
.highlight .cp { color: #507090 } /* Comment.Preproc */ | |
.highlight .c1 { color: #808080 } /* Comment.Single */ | |
.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ | |
.highlight .gd { color: #A00000 } /* Generic.Deleted */ |
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::rc::Rc; | |
use std::cell::RefCell; | |
struct Foo { | |
// Owns multiple mut trait objects | |
bars: Vec<Rc<RefCell<Bar>>>, | |
} | |
impl Foo { | |
fn new() -> Foo { |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
OlderNewer