Skip to content

Instantly share code, notes, and snippets.

View 7LayersDesign's full-sized avatar

Andy Hutchins 7LayersDesign

View GitHub Profile
@7LayersDesign
7LayersDesign / firetv_charles_certificate_trust.sh
Last active January 16, 2024 21:35
ADB Command to Trust Charles certificate on FireTV
./adb shell am start -a "android.intent.action.VIEW" -d "file:///storage/emulated/0/Download/charles-ssl-proxying-certificate.pem" -t "application/x-x509-ca-cert"
https://1unjqeylyh.execute-api.us-east-1.amazonaws.com/Dev?siteId=#{site.id}&siteTitle=#e{site.title}&customId=#{section.customId}&advId=#{ad.advertiser.id}&creativeId=#{ad.creative.id}&placementId=#{ad.placement.id}&deviceId=#{request.deviceId}&clientIp=#{request.clientAddress}&creativeApi=#{ad.creative.rendition.creativeApi}&taglocation=dppf
var out = document.getElementById('out');
for ( var i=1 ; i <=100 ; ++i ) { out.innerHTML+= i+"\t"+romanize(i)+"<br/>"; }
function romanize(num) {
var lookup = {M:1000,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},
roman = '',
i;
for ( i in lookup ) {
while ( num >= lookup[i] ) {
roman += i;
num -= lookup[i];
We found a bug that allows duping items using the quantum storage units.
__Versions__
Quantum Storage Version: 3.2.7
FTB Infinity Lite: Version 1.0.1 (Server)
__Platform__
Windows 7
__Severity__
<html>
<head>
<script async='async' src='https://www.googletagservices.com/tag/js/gpt.js'></script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
</script>
<script>
googletag.cmd.push(function() {
@7LayersDesign
7LayersDesign / dfp_key_clean.js
Created August 9, 2016 17:58
DFP Key Cleaning
var _cleanValue = function(val) {
// Convert pipes and spaces to underscores
val = val.replace(/\|/g, "_");
val = val.replace(/\ /g, "_");
val = val.replace(/\-/g, "_");
// Strip out any other bad characters.
val = val.replace(/\;/g, "");
val = val.replace(/\&/g, "");
val = val.replace(/\\/g, "");
$("#guac_click").on("click", function() {   
window.filmstrip.jumpSlide(3);
// Fire impression
var imp = "http://impressionurl?cb=" + (new Date()).getTime();
$('body').append("<img src='" + imp + "' width='1' height='1'>");
}
<!-- Use for testing -->
<a href="http://pubads.g.doubleclick.net/gampad/jump?iu=201823409/food&sz=1x2&t=topic%3Dwalmart_test&c=23981209" target="_blank">
<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=201823409/food&sz=1x2&t=topic%3Dwalmart_test&c=23981209">
</a>
<br>
<!-- Use for production -->
<a href="http://pubads.g.doubleclick.net/gampad/jump?iu=109359770/food&sz=1x2&t=topic%3Dwalmart_email_logo&c=23981209" target="_blank">
<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=109359770/food&sz=1x2&t=topic%3Dwalmart_email_logo&c=23981209">
<!-- Ad Slots -->
<a href="http://pubads.g.doubleclick.net/gampad/jump?iu=201823409/food&sz=1x2&t=topic%3Dwalmart_test&c=23981209" target="_blank">
<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=201823409/food&sz=1x2&t=topic%3Dwalmart_test&c=23981209" width="120" height="50">
</a>
@7LayersDesign
7LayersDesign / sni-old-ad-methods.js
Created July 13, 2015 13:47
Get rough list of old code ad calls.
(function(){
var adMethods = [], adPattern = /^[a-z]*Ad$/i;
for( var key in window ){
if( window.hasOwnProperty(key) ){
if( adPattern.test(key) ){
adMethods.push(key);
}
}
}
return adMethods;