Skip to content

Instantly share code, notes, and snippets.

View ajohnclark's full-sized avatar

John Clark ajohnclark

View GitHub Profile
@ajohnclark
ajohnclark / install.sh
Last active October 24, 2017 18:21
sublime text 3 fedora 26 build_3143
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/opt/subl3/sublime_text
Icon=/opt/subl3/Icon/128x128/sublime-text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@ajohnclark
ajohnclark / raw-ad.php
Created June 15, 2017 14:18
Raw Ad for Reddit
<?php
# START SAFE AD ROTATE
echo '<html><head><title>Ad</title><meta name="robots" content="noindex"></head><body>';
# how to serve it safely
# <iframe sandbox="allow-forms allow-scripts allow-same-origin allow-pointer-lock allow-popups" width="300" height="250" frameBorder="0" scrolling="no" style="padding:0;margin:0;" src="http://abc.com/safe-ad.php?ad-id=123id></iframe>
$ad_id = $_GET['ad-id'];
if ($ad_id == '123'){