openssl genrsa 2048 > edgenode1.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key edgenode1.key -subj "/C=JO/CN=*.goll.com"> edgenode1-wildcard.cert
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
# Button remap for Kensington Expert Wireless Trackball to: | |
# BACK MIDDLE | |
# O | |
# LEFT RIGHT | |
# save this file under '/etc/udev/hwdb.d/90-kensington-expert-trackball-remap.hwdb' | |
# run `sudo systemd-hwdb update` and reboot | |
# | |
# source: https://askubuntu.com/questions/1145057/remapping-mouse-buttons-to-keyboard-keys | |
# and: https://gist.github.com/dnlvgl/d16fd822bc90dcdaaae262a76fad884e | |
# |
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
# Button remap for Kensington Expert Trackball | |
# both upper buttons (90003 + 90004) act as BTN_LEFT (272) | |
# both lower buttons (90001 + 90002) act as BTN_RIGHT (273) | |
# save this file under '/etc/udev/hwdb.d/90-kensington-expert-trackball-remap.hwdb' | |
# run `sudo systemd-hwdb update` and reboot | |
# | |
# source: https://askubuntu.com/questions/1145057/remapping-mouse-buttons-to-keyboard-keys | |
# /sys/class/input/event20/device/id/bustype:0003 | |
# /sys/class/input/event20/device/id/product:1020 | |
# /sys/class/input/event20/device/id/vendor:047d |
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
""" | |
Kivy asyncio example app. | |
Kivy needs to run on the main thread and its graphical instructions have to be | |
called from there. But it's still possible to run an asyncio EventLoop, it | |
just has to happen on its own, separate thread. | |
Requires Python 3.5+. | |
""" |
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
class MultiSerializerViewSetMixin(object): | |
def get_serializer_class(self): | |
""" | |
Look for serializer class in self.serializer_action_classes, which | |
should be a dict mapping action name (key) to serializer class (value), | |
i.e.: | |
class MyViewSet(ViewSet): | |
serializer_class = MyDefaultSerializer | |
serializer_action_classes = { |
- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
DEBUG=True | |
LOG_FILE_SIZE=1024*1000 | |
LOGGING = { | |
'version' : 1, | |
'disable_existing_loggers':True, | |
'formatters' : { | |
'simple' : { | |
'format' : '%(levelname)s %(name)s %(message)s' | |
}, |
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 | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
NewerOlder