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
# Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. | |
# I used this to connect to my university's wireless network on Arch linux. | |
# Here's the command I used: | |
# | |
# wpa_supplicant -i wlan0 -c ./wpa_supplicant.conf | |
# | |
network={ | |
ssid="YOUR_SSID" | |
scan_ssid=1 |
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
/** | |
* More info? | |
* a.dotreppe@aspyct.org | |
* http://aspyct.org | |
* | |
* Hope it helps :) | |
*/ | |
#include <stdio.h> | |
#include <stdlib.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
<!-- Add these permissions to your android manifest --> | |
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> | |
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> |
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
# Sample implementation of quicksort and mergesort in ruby | |
# Both algorithm sort in O(n * lg(n)) time | |
# Quicksort works inplace, where mergesort works in a new array | |
def quicksort(array, from=0, to=nil) | |
if to == nil | |
# Sort the whole array, by default | |
to = array.count - 1 | |
end |
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
# Create a ZFS pool (i.e. choose disks that are part of the storage) | |
# In this case, it's a two-disk mirror | |
# Make sure to use /dev/disk/by-id/* for a stable pool | |
sudo zpool create <pool_name> mirror /dev/disk/by-id/<disk1> /dev/disk/by-id/<disk2> | |
sudo zfs create <pool_name>/<dataset_name> | |
# Check status | |
sudo zpool 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
package org.aspyct.going; | |
import java.util.Iterator; | |
import java.util.Stack; | |
/** | |
* This is an implementation of the Left Leaning Red/Black Tree as | |
* described in the course from the University of Princeton. | |
* | |
* This code contains a lot of assertions (assert ;). |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!-- French Dvorak Layout --> | |
<!-- http://www.clavier-dvorak.org/ --> | |
<!-- version 0.6.5 --> | |
<keyboard group="126" id="6542" name="Aspyct French Dvorak" maxout="5"> | |
<!-- | |
This layout is designed for ISO and ANSI keyboards. The extra | |
key on an ISO keyboard (next to the left Shift) is optional, | |
characters on it are also accessible through other keys. |
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
#ifndef _COMMON_H_ | |
#define _COMMON_H_ | |
#define SEM_KEY_FILE ("sem.key") | |
#endif /* _COMMON_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
/* | |
* File: display-double.cpp | |
* Author: aspyct | |
* | |
* Can be compiled to a binaly that displays the binary value of double numbers. | |
* Usage : ./a.out <number1> ... <number n> | |
* Example: ./a.out 1.0 2.5 | |
* | |
* Created on July 28, 2012, 11:03 PM | |
*/ |
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 | |
byobu-enable | |
sudo apt install -y vim vim-addon-manager vim-python-jedi vim-ctrlp ranger ripgrep | |
vim-addons install ctrlp python-jedi | |
echo "set nu et nowrap ts=4 sw=4 ai" > ~/.vimrc |
NewerOlder