Skip to content

Instantly share code, notes, and snippets.

@zfwf
zfwf / dell-sysinfo.sh
Last active May 27, 2017 11:05
Dell system info
sudo dmidecode -s system-serial-number
sudo dmidecode -s bios-version
sudo dmidecode -s bios-release-date
@zfwf
zfwf / enable-super-key-dell-oem
Created March 27, 2017 01:28
enable super key on Dell OEM machine
http://www.dell.com/support/article/us/en/04/HOW12108/how-to-enable-the-ubuntu-super-key-on-dell-oem-ubuntu-installations
@zfwf
zfwf / dell-touchpad-fix-xps-precision.md
Last active April 11, 2017 10:46
Dell XPS13/XPS15/Precision E5520/ touchpad fix

from: https://ubuntuforums.org/showthread.php?t=2327954&p=13505497#post13505497
Change syndaemon settings to: syndaemon -i 1.0 -KRd
Unfortunately this cannot be set on startup as of 16.04: https://bugs.launchpad.net/ubuntu/+source/unity-settings-daemon/+bug/1351772
Use after logon to activate: pkill syndaemon; syndaemon -i 1.0 -KRd

from: https://ubuntuforums.org/showthread.php?t=2316240&p=13461233#post13461233
add below entry to: /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf

# Disable generic Synaptics device, as we're using
# "DLL0704:01 06CB:76AE Touchpad"
@zfwf
zfwf / polyglot-python.cmd
Created January 29, 2017 23:21
polyglot to run python in windows batch
@SETLOCAL ENABLEDELAYEDEXPANSION & CALL "%~f0" & (IF NOT ERRORLEVEL 1 (python -x "%~f0" %*) ELSE (ECHO No python environment found on path)) & PAUSE & EXIT /B !ERRORLEVEL!
#%0 is the command itself. So %~f0 expands to the full path of the batch file. %* stands for all command line parameters except %0.
#do something in python
interface Immu { String getA() ; String getB ( ) }
Immu immu ( final String a , final String b )
{
/* validation of a and b */
return new Immu ( )
{
public String getA ( ) { return a ; }
public String getB ( ) { return b ; }

Issue

Encountered an error when running dev_appserver.py .: File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 336, in start raise BindError('Unable to find a consistent port for %s' % host) google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to find a consistent port for localhost Exception in thread Thread-1 (most likely raised during interpreter shutdown):

Solution (sort of...)

Attempted following steps:

  1. python -m SimpleHTTPServer server starts on port 8000, works fine