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
//----------------------------------------------- | |
// Instructions for this file | |
//----------------------------------------------- | |
// This file will provide the basis for all the more specific files. All the | |
// options set in here will be used by `config.js` files unless they're | |
// overridden in that file. | |
// | |
// If you want to affect all coins at once, edit this file; you don't need to | |
// reboot the bots though, they'll see that the config changed. | |
//----------------------------------------------- |
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
Section "InputClass" | |
Identifier "touchpad" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
#1 finger = left click, 2 finger = right click, 3 finger = middle click | |
Option "TapButton2" "3" | |
Option "TapButton3" "2" | |
Option "ClickFinger2" "3" | |
Option "ClickFinger3" "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
public enum SEARCHABLE { | |
DESCRIPTION("description"), | |
NAME("name"), | |
DISPLAYNAME("displayName"), | |
TAGS("tags"); | |
final private static Set<String> _searchableFieldNames = | |
Arrays.stream(SEARCHABLE.values()).map(SEARCHABLE::getFieldName).collect(Collectors.toSet()); | |
final private String _fieldName; |
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
# Usage: $ bl <integer><- or +> | |
function bl { | |
INC_PARAM=10 | |
DEC_PARAM=-${INC_PARAM} | |
case $1 in | |
+([0-9])- ) xbacklight -inc $(expr -1 + $DEC_PARAM \* ${1%-}); return 0;; | |
+([0-9])+ ) xbacklight -inc $(expr 1 + $INC_PARAM \* ${1%+}); return 0;; | |
* ) return 1;; | |
esac | |
} |
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
# https://class.coursera.org/algo-009/forum/thread?thread_id=29 | |
def get_second_largest(nums_lst): | |
""" | |
>>> get_second_largest([3,1,10,17,12,4]) | |
12 | |
""" | |
def get_greaters_lst(lst): | |
if len(lst) == 1: | |
return lst |
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
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.nio.channels.FileChannel; | |
// From: https://github.com/sioutisc/jdds/blob/master/JDDS/src/rtjdds/rtps/transport/NamedPipe.java |
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
import base64 | |
import cStringIO | |
import PIL.Image | |
''' | |
From: | |
http://stackoverflow.com/questions/31410525/base64-uri-to-png-python | |
http://stackoverflow.com/questions/3715493/encoding-an-image-file-with-base64 | |
http://effbot.org/imagingbook/image.htm | |
''' |