Skip to content

Instantly share code, notes, and snippets.

View Bidthedog's full-sized avatar

Chris Bidthedog

View GitHub Profile
@Bidthedog
Bidthedog / .gitignore
Last active June 7, 2020 09:50
SQS Notes ETL Script
# Don't push anything that isn't specified in this file
*
!.gitignore
!.gitattributes
!etl.ps1
@Bidthedog
Bidthedog / gist:8285042fa5200108e7135b841e623b5d
Last active July 25, 2018 11:00
Angular 6 + RxJs 6 Refresh Token Interceptor - final retry cancels itself?
@Injectable()
export class HandleUnauthorisedRequestInterceptor implements HttpInterceptor {
constructor(
private securityService: SecurityService
) { }
public intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
console.log('intercepting ' + req.method + ' to ' + req.url);
// Ignore all security controller requests as they're all dealt with separately
if (req.url.indexOf('/security/') > -1) {
$words = (((Invoke-WebRequest -Uri "https://www.morewords.com/contains/ei/").ParsedHtml).All.Tags("p")[3] | % InnerText) -split '\n'
Write-Host "Total Words: $($words.Count)
Matching 'cei': $(($words | ? { $_ -match "cei" }).Count)
Matching 'ei': $(($words | ? { $_ -match "[^c]ei" }).Count)"
#!/bin/bash
baseDirs=( /d/Git/ /d/Projects/ )
let i=1
echo
echo "Pulling git repositories..."
echo
for baseDir in "${baseDirs[@]}"; do
cd $baseDir
echo "$((i++)) - Base directory '$baseDir'"