Skip to content

Instantly share code, notes, and snippets.

Darragh O'Riordan darraghoriordan

Block or report user

Report or block darraghoriordan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View heroku_config.js
"root": "build/",
"clean_urls": false,
"routes": {
"/**": "index.html"
npm install -g create-react-app
create-react-app my-app
cd my-app
git init
heroku create -b
git add .
git commit -m "react-create-app on Heroku"
git push heroku master
heroku open
# do it
vgg = Vgg16()
# Grab a few images at a time for training and validation.
# NB: They must be in subdirectories named based on their category
train_batches = vgg.get_batches(train_path, batch_size=batch_size)
val_batches = vgg.get_batches(valid_path, batch_size=batch_size*2)
vgg.finetune(train_batches) = 0.01
View header.groovy
import java.nio.charset.StandardCharsets;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;
import java.sql.Date.*;
View swaggeruiconfig.cs
c.InjectStylesheet(assemblyType, "Api.SwaggerExtensions.swaggeroverrides.css");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.hmac-sha1.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.moment.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.enc-base64.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.sha256.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.apihmacheaderauth.js");
darraghoriordan / swhmac.groovy
Created Sep 19, 2017
Adding custom hmac auth to swagger ui
View swhmac.groovy
(function () {
$(function () {
/*I add the ui elements I need here. I thought it would be better put them in here at runtime rather than hard code them in the index.html in case the index.html from my version of swashbuckle is made obsolete in a future version of the package. */
var hmacAuthUi =
<div class="input"><label for="input_api_username">Api Username: </label><input placeholder="Api Username" id="input_api_username" name="input_api_username" type="text" size="20"></div>
' +
<div class="input"><label for="input_api_hmackey">Api Key: </label><input placeholder="ApiKey" id="input_api_hmackey" name="input_api_hmackey" type="text" size="20"></div>
darraghoriordan / getLocalScreenImages.ps1
Created Jul 26, 2017
How to get your windows lock screen images
View getLocalScreenImages.ps1
$destinationFolder = "$Env:userprofile\desktop\lockscreenimages"
$lockScreenImageStore = "$Env:userprofile\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"
$File = Get-ChildItem -Path "$lockScreenImageStore" -Recurse
if (!(Test-Path -path $destinationFolder)) {New-Item "$destinationFolder" -Type Directory}
for($i = 0; $i -lt $File.Count; $i++)
Copy-Item -Force $File[$i].FullName ("$destinationFolder\" + $File[$i].BaseName + $i +".jpg")
You can’t perform that action at this time.