Skip to content

Instantly share code, notes, and snippets.

@pamelafox
pamelafox / babyhint.js
Created December 2, 2013 05:13
BabyHint
/*
* BabyHint does a line-by-line check for common beginner programming mistakes,
* such as misspelling, missing spaces, missing commas, etc. It is used in
* conjunction with JSHINT to report errors to the user.
*
* Each error returned contains the members:
* {
* row : the row at which the error was found
* column : the column at which the error was found
* text : the error messaage
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active July 26, 2024 20:17
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())

Stylebot Patterns

stylebot.me has been down for a while, so I create this gist to help those who need document on pattern settings.

Basic (default)

By default, Stylebot uses simple text strings to match styles to websites. Examples:

  • docs.google.com : Matches any URL with docs.google.com in it.
  • docs.google.com, spreadsheets.google.com : Matches any URL with docs.google.com or spreadsheets.google.com in it.

Advanced

Stylebot supports wildcards **, * and ,

@rocketjosh
rocketjosh / Macchina_MPG.INO
Created November 3, 2017 17:08
Display MPG information with LED display and Macchina M2 with ISO9141-based vehicle
/*
* MPG LED display using Adafruit NeoPixel and Macchina M2 with a pre-CAN bus
* ISO9141 (K-line) based vehicle.
*
* These parts are used in this project:
*
* https://www.macchina.cc/content/m2-under-dash
* https://www.adafruit.com/product/2869
*
* Requires "Macchina M2" board to be installed and selected. For instructions, go here: