Skip to content

Instantly share code, notes, and snippets.

View dannystaple's full-sized avatar

Danny Staple dannystaple

View GitHub Profile
@kaelzhang
kaelzhang / vscode-python.md
Last active November 24, 2020 12:54
vscode (pythonVSCode): how to fix the issue that unable to import 'somemodule'

There is a common problem we often encounter when using vscode.

[pylint] E0401:Unable to import 'tensorflow'
  • First make sure that both the python.pythonPath and python.linting.pylintPath are configured correctly in the WORKSPACE SETTINGS, especilly for the cases when you use anaconda or virtualenv
{
@gbaman
gbaman / HowToOTGFast.md
Last active April 16, 2024 06:29
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@dylanhthomas
dylanhthomas / excel-remove-trailing-slash.txt
Created June 18, 2013 16:36
Remove the Trailing slash from a cell in Excel. This is especially handy when dealing with lots of urls. Replace "A1" with your cell.
=IF(RIGHT(A1,(LEN(A1)-(LEN(A1)-1)))="/",LEFT(A1,(LEN(A1)-1)),A1)
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh