This tool is for batch resetting DET NSW student passwords though EMU, in batch.
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 use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
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
require 'mechanize' | |
require 'logger' | |
require 'io/console' | |
require 'json' | |
SETTINGS = ".ed_profile_scraper.yml" | |
COOKIES = ".ed_profile_scraper.cookies" | |
BASE_URL = "https://companion.orerve.net/" |
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 | |
# node-reinstall | |
# credit: | |
# http://stackoverflow.com/a/11178106/2083544 | |
# https://gist.github.com/brock/5b1b70590e1171c4ab54 | |
## program version | |
## Update versions accordingly. https://github.com/creationix/nvm/releases | |
VERSION="0.31.0" |
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
# Ask user if they want to use the python script for CSV parsing | |
$python = Read-Host 'Do you want to use the python script to process the csv? (Requires python obviously) (y/n)' | |
# Functions | |
Function Download { | |
"Downloading the latest dump!" | |
$wc = New-Object System.Net.WebClient | |
$wc.Headers.add('Accept-Encoding', 'gzip, deflate, sdch') | |
$wc.DownloadFile($url, $output) |
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
# Functions | |
Function Download { | |
"Downloading the latest dump!" | |
$wc = New-Object System.Net.WebClient | |
$wc.Headers.add('Accept-Encoding', 'gzip, deflate, sdch') | |
$wc.DownloadFile($url, $output) | |
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" | |
"Finished downloading the latest dump!" | |
unzip |
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
function interval(func, wait, times){ | |
var interv = function(w, t){ | |
return function(){ | |
if(typeof t === "undefined" || t-- > 0){ | |
setTimeout(interv, w); | |
try{ | |
func.call(null); | |
} | |
catch(e){ | |
t = 0; |
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/sh | |
apt-get -y install git bc | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
mkdir /etc/letsencrypt |
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
$.fn.textWidth = function(){ | |
const text = $(this).html(); | |
const testElem = document.createElement('span'); | |
testElem.style.opacity = 0; | |
$(testElem).html('<span>'+text+'</span>'); | |
document.body.appendChild(testElem); | |
$(testElem).remove(); | |
return width; | |
}; |
OlderNewer