This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Regular commander.js logic up here. None of this | |
// logic is run if a subcommand match was found | |
var knownSubCommands = [ | |
"blah", | |
"ha", | |
"etc" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dns = require('dns'); | |
function reverseLookup(ip) { | |
dns.reverse(ip,function(err,domains){ | |
if(err!=null) callback(err); | |
domains.forEach(function(domain){ | |
dns.lookup(domain,function(err, address, family){ | |
console.log(domain,'[',address,']'); | |
console.log('reverse:',ip==address); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I had a LOT of trouble finding working examples of the ZAutomation API for RaZberry API. I eventually figured out what exactly to use by combining information from multiple sources and sniffing requests from the 'Expert UI'. Some areas I found information: | |
- http://docs.zwayhomeautomation.apiary.io/ | |
- http://wiki.micasaverde.com/index.php/ZWave_Command_Classes | |
- https://www.npmjs.org/package/mqtt-zway | |
- The included PDFs | |
- The expert API area on the device web UI | |
- https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo?hl=en (Postman POST/GET sniffer) | |
# Some general RaZberry API commands: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
maxconn 2048 | |
defaults | |
mode http | |
timeout connect 5000ms | |
timeout client 90000ms | |
timeout server 90000ms | |
frontend secure-http-in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/ | |
# Adapted to work with the official image available into Mac App Store | |
# | |
# Enjoy! | |
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebSocketServer = require('ws').Server; | |
var wss = new WebSocketServer({port: 8080}); | |
var jwt = require('jsonwebtoken'); | |
/** | |
The way I like to work with 'ws' is to convert everything to an event if possible. | |
**/ | |
function toEvent (message) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
making the ubnt wifi awesome (uap ac lite) w/ lede (openwrt) | |
the reasons you would do this: | |
- you get 802.11r | |
- you get better roaming | |
- you get access to some new 5ghz channels | |
I AM NOT TO BE HELD RESPONSIBLE FOR ANYTHING IN HERE. DO AT YOUR OWN RISK. THANK YOU AND HAVE A LOVELY DAY. | |
** note that though we're using Lede, it's essentially openwrt minus the drama |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Example code for driving the Sainsmart 16-Channel 9-36V USB Relay Module (Product 101-70-208) | |
Documents for this module were found at: | |
https://s3.amazonaws.com/s3.image.smart/download/101-70-208/101-70-208.zip | |
The protocol appears to be MODBUS ASCII: | |
https://en.wikipedia.org/wiki/Modbus#Protocol_versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Clone the repo | |
git clone --depth=1 git://someserver/somerepo dirformynewrepo | |
// Remove the .git directory | |
rm -rf !$/.git |
OlderNewer