Skip to content

Instantly share code, notes, and snippets.

@mrmnmly
mrmnmly / gist:2556fe35b98f7e863ddb7149128eb792
Created July 2, 2017 10:58
CUPS Printer print borderless
Use:
```
lpoptions -l printername
```
to view the list of printer options. The two lines of interest are:
`StpiShrinkOutput/Shrink` Page If Necessary to Fit Borders: Shrink Crop *Expand
`StpBorderless/Borderless`: False *True
@gnuton
gnuton / gist:3ba6dca3ce27d13833da
Created December 3, 2015 23:09
Python script which switch Huawey hilink e3372 to debug mode, then sends some command to its serial console.
import urllib2
# retrieve token
url="http://192.168.8.1/api/webserver/token"
response = urllib2.urlopen(url)
xml=response.read()
token=xml[59:-23]
print "Got token %s" % token