Skip to content

Instantly share code, notes, and snippets.

View qdot's full-sized avatar
🦊

qDot qdot

🦊
View GitHub Profile
@qdot
qdot / keybase.md
Created September 25, 2014 04:03
keybase.md

Keybase proof

I hereby claim:

  • I am qdot on github.
  • I am qdot (https://keybase.io/qdot) on keybase.
  • I have a public key whose fingerprint is ADD0 14EC B46B 232F 5D3A DDBF 1A3D 9385 157A 86FC

To claim this, I am signing this object:

@qdot
qdot / gist:6f83b7d3bd2fca9a1f6c
Created March 30, 2015 23:02
buffer local erc-hide-list
(defvar qdot/erc-status-allow-list nil
"alist of channels and the event messages to show for them.")
(setq qdot/erc-status-allow-list
'(("&bitlbee" . ("PART" "JOIN" "MODE" "NICK" "QUIT"))
("znc-bitlbee" . ("PART" "JOIN" "MODE" "NICK" "QUIT"))))
(defadvice erc-hide-current-message-p (around qdot/erc-hide-per-buffer-advice last (parsed) activate)
"Addition to hide message predicate to check for channel
specific or network specific join/part showing. PART/JOIN/MODE
_NET_DESKTOP_GEOMETRY: no such atom on any window.
_NET_DESKTOP_VIEWPORT: no such atom on any window.
_NET_NUMBER_OF_DESKTOPS: not found.
-geometry 3600x1080+0+0
;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph
;; Takes a multi-line paragraph and makes it into a single line of text.
(defun unfill-paragraph ()
(interactive)
(let ((fill-column (point-max)))
(fill-paragraph nil)))
Prepare:
mkdir foo
cd foo
git init
echo A>A
echo B>B
git add A B
git commit -m AB
git checkout -b br1
echo BB>>B
@qdot
qdot / gist:8462849
Created January 16, 2014 20:29
ftu test
marionette('First Time Use >', function() {
var assert = require('assert');
var FTU = 'app://communications.gaiamobile.org';
var client = marionette.client();
var clickThruPanel = function(panel_id, button_id) {
if (panel_id == '#wifi') {
// The wifi panel will bring up a screen to show it is scanning for
// networks. Not waiting for this to clear will blow test timing and cause
marionette('First Time Use >', function() {
var assert = require('assert');
var FTU = 'app://communications.gaiamobile.org';
var client = marionette.client();
var clickThruPanel = function(panel_id, button_id) {
if (panel_id == '#wifi') {
// The wifi panel will bring up a screen to show it is scanning for
// networks. Not waiting for this to clear will blow test timing and cause
~/code/mozbuild/gaia $ ./bin/gaia-marionette apps/communications/ftu/test/marionette/ftu_tests.js
make: Entering directory `/share/mozbuild/gaia'
./node_modules/.bin/mozilla-download \
--verbose \
--product b2g \
--channel tinderbox \
--branch mozilla-central b2g
make: Leaving directory `/share/mozbuild/gaia'
npm WARN package.json marionette-client@1.1.0 No repository field.
npm WARN package.json marionette-content-script@0.0.0 No repository field.
@qdot
qdot / gist:670533
Created November 10, 2010 08:10
Python kinect control packet replay code
# some example code from pyusb, otherwise its all public domain. enjoy & keep hackin! - ladyada
import sys
# sys.path.append('/Users/qdot/git-projects/library/usr_darwin_10.5_x86/lib/python2.6/site-packages')
import usb.core
import usb.util
import sys
import time
# find our device
@qdot
qdot / gist:a82b6d1d7463540224e6f2428a54d5f7
Created June 4, 2016 04:00
Error on update message about bot being removed from a group
2016-06-03 20:56:07,834 - telegram.bot - DEBUG - Getting updates: [802131457]
2016-06-03 20:56:07,834 - telegram.bot - DEBUG - [<telegram.update.Update object at 0x7f4150dd4828>]
2016-06-03 20:56:07,834 - telegram.ext.updater - ERROR - unhandled exception
Traceback (most recent call last):
File "/home/qdot/venvs/tgbot/lib/python3.4/site-packages/telegram/ext/updater.py", line 105, in _thread_wrapper
target(*args, **kwargs)
File "/home/qdot/venvs/tgbot/lib/python3.4/site-packages/telegram/ext/updater.py", line 219, in _start_polling
network_delay=network_delay)
File "/home/qdot/venvs/tgbot/lib/python3.4/site-packages/telegram/bot.py", line 109, in decorator
result = func(self, *args, **kwargs)