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
AWS DeepLens factory reset steps followed: | |
Get Ubuntu and microSD card set up using AWS forum supplied instructions | |
https://s3.amazonaws.com/deeplens-public/factory-restore/DeepLens_System_Restore_Instruction.pdf | |
Pre-requisites: borked DeepLens in need of restore | |
keyboard | |
micro HDMI cable | |
monitor | |
bootable Ubuntu live USB |
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
package com.willhamill.lambda.apigateway; | |
public class Identity { | |
private String cognitoIdentityPoolId; | |
private String accountId; | |
private String cognitoIdentityId; | |
private String caller; | |
private String apiKey; | |
private String sourceIp; |
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
package com.willhamill.lambda.apigateway; | |
public class RequestContext { | |
private String accountId; | |
private String resourceId; | |
private String stage; | |
private String requestId; | |
private Identity identity; | |
private String resourcePath; |
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
package com.willhamill.lambda.apigateway; | |
import java.util.Map; | |
/* | |
Response class for an API Gateway proxied lambda | |
Must conform to these three properties as per AWS docs | |
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html#api-gateway-simple-proxy-for-lambda-output-format | |
Headers map will be merged with whichever header AWS sets, e.g. X-Amzn-Trace-Id | |
*/ |
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
package com.willhamill.lambda.apigateway; | |
import java.util.Map; | |
/* | |
API Gateway Request object defined [mostly] as per AWS documentation: | |
http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html#api-gateway-simple-proxy-for-lambda-input-format | |
**WARNING** The AWS docs appear to be somewhat inaccurate in the following way: | |
- message property does not exist on request |
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
Step 1: Select and copy the following javascript (triple click on the line for easy selecting) | |
javascript: (function() { var elems = document.getElementsByTagName('p'); for (var i in elems) { if (typeof(elems[i]) != 'object') continue; if((' ' + elems[i].className + ' ').indexOf(' ' + 'byline' + ' ') >= 0) { var byline = elems[i]; if (byline.innerHTML.indexOf('Jonathan Jones') != -1) { byline.parentNode.parentNode.style.display = 'none'; } } }})(); | |
Step 2: Right click on your bookmark bar and click on 'Add Page' | |
Step 3: Enter 'Guardian Cleanup' in Name and paste the javascript from step 1 as the url | |
Step 4: Click Save to create bookmarklet | |
Step 5: Demo by navigating to sample page http://www.theguardian.com/artanddesign/jonathanjonesblog/2015/aug/31/terry-pratchett-is-not-a-literary-genius and clicking 'Guardian Cleanup' in your bookmark bar |
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
import org.junit.Test; | |
import static org.junit.Assert.fail; | |
public class StringComparisonTest { | |
@Test | |
public void testCompileTimeVariable() { | |
String testCompileTimeString = "compileTime"; | |
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
// ==UserScript== | |
// @name Facebook Cleanup | |
// @description Remove ads from your Facebook page | |
// @author @willhamill | |
// @include https://facebook.com/* | |
// @include https://www.facebook.com/* | |
// @include http://facebook.com/* | |
// @include http://www.facebook.com/* | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Twitter Cleanup | |
// @description Remove crap from your Twitter feed without unfollowing people | |
// @author @willhamill | |
// @include https://twitter.com/* | |
// @include https://www.twitter.com/* | |
// @include http://twitter.com/* | |
// @include http://www.twitter.com/* | |
// ==/UserScript== |