Skip to content

Instantly share code, notes, and snippets.

#
# This powershell script automates the task of restarting a network
# adapter on a particular System event.
#
# The practical application is to work around the issue of
# buggy Killer Wifi (Qualcomm Atheros) cards crashing during standby.
#
# Tested on XPS 13 9370 (2018)
#
# The predefined trigger checks for the following event:
@desaster
desaster / foo.sh
Last active July 24, 2023 16:34
How to run tomcat as non-root with docker
#
# How to run tomcat as non-root with docker
#
# We want to map the tomact process to host user, which is created here
sudo useradd -r docker-tomcat
# start a container, but don't run tomcat yet
docker run -it -d --name=tomcat-intermediate -u $(id docker-tomcat -u) tomcat:8.0 /bin/sh
! URxvt*termName: string
URxvt*termName: xterm-256color
! URxvt*geometry: geometry
! URxvt*chdir: string
! URxvt*reverseVideo: boolean
! URxvt*loginShell: boolean
! URxvt*multiClickTime: number
! URxvt*jumpScroll: boolean
! URxvt*skipScroll: boolean
! URxvt*pastableTabs: boolean
$app = Start-Process -PassThru -FilePath C:\windows\system32\notepad.exe
Write-Host "Hello World!"
Write-Host "Process PID seems to be" $app.Id
Wait-Process -Id $app.Id
#!/usr/bin/env python
# {u'vms': [{u'memory': 0,
# u'name': u'honeydrive',
# u'ostype': u'hvm',
# u'state': 5,
# u'uuid': u'a14eb9b0-c5fc-d66a-0665-b32972a893e3'},
# {u'memory': 0,
# u'name': u'dvx',
# u'ostype': u'hvm',
@desaster
desaster / gist:6c5bbf30b43f797a5e1a
Created September 24, 2014 07:49
xmpp setup in kippo
$ git clone https://github.com/desaster/kippo/
$ cd kippo
$ virtualenv env
$ . ./env/bin/activate
$ pip install twisted
$ pip install pyasn1
$ pip install pycrypto
(optional):
@desaster
desaster / crash.irc
Last active August 29, 2015 14:05
epic5 /encoding crash
encoding #channel NONE
# (and another crash):
#encoding #channel ISO-8859-1
#encoding #channel NONE
diff --git a/src/sk/vx/connectbot/service/TerminalBridge.java b/src/sk/vx/connectbot/service/TerminalBridge.java
index 762323f..56ba895 100644
--- a/src/sk/vx/connectbot/service/TerminalBridge.java
+++ b/src/sk/vx/connectbot/service/TerminalBridge.java
@@ -763,10 +763,17 @@ public class TerminalBridge implements VDUDisplay {
// write the text string starting at 'c' for 'addr' number of characters
defaultPaint.setColor(fg);
- if((currAttr & VDUBuffer.INVISIBLE) == 0)
- canvas.drawText(buffer.charArray[buffer.windowBase + l], c,