Skip to content

Instantly share code, notes, and snippets.

View astuk's full-sized avatar

AndrewTurner astuk

  • Chelmsford
View GitHub Profile
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.
@astuk
astuk / reboot-modem.js
Created July 2, 2018 10:47 — forked from jonathanhoskin/reboot-modem.js
Huawei B315 Modem Reboot Script
// PhantomJS script to reboot a Huawei B315 modem
//
// Author: Jonathan Hoskin / 2017-09-02
// Twitter: @jhossnz
// Github: https://github.com/jonathanhoskin
//
// Requires PhantomJS ~ 2.1.1
//
// Enter your own modem details here
var username = 'admin';