Skip to content

Instantly share code, notes, and snippets.

View wethinkagile's full-sized avatar
:electron:
Your Potential First

We Think Agile (wta) wethinkagile

:electron:
Your Potential First
View GitHub Profile
@wethinkagile
wethinkagile / gist:7036360
Last active December 25, 2015 20:39
Implement MathJax in Ghost
<script type="text/javascript"
src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
@wethinkagile
wethinkagile / gist:7053670
Last active December 25, 2015 22:59
ExternalInterface.Call
import flash.external.*;
var JSvalue:String;
JSvalue = ExternalInterface.call('JsTestFunction','The_String');
@wethinkagile
wethinkagile / gist:7053933
Created October 19, 2013 09:59
Return value from JavaScript to AS3
JsTestFunction(myFlashValue) {
return (myFlashValue + '_ACK');
}
@wethinkagile
wethinkagile / gist:7053963
Last active December 25, 2015 22:59
Thunderbolt AS3 debug logger
import org.osflash.thunderbolt.Logger;
Logger.error (JSvalue); // outputs _ACK
@wethinkagile
wethinkagile / gist:7054850
Last active December 25, 2015 23:09
Callback Method of ExternalInterface in AS3
var methodName: String = "callFlash";
var method: Function = JS_Phonebooth;
ExternalInterface.addCallback (methodName, method);
function JS_Phonebooth (myObj: Object):void {
Logger.error (myObj); // outputs value passed on by JavaScript
}
@wethinkagile
wethinkagile / gist:7061395
Last active December 26, 2015 00:08
Dynamic iFrame
window.onload = function() {
// Instance variables
var parentDiv;
var theIframe;
var contentDoc;
var newScrollHeight;
parentDiv = parent.document.getElementById('DivID');
@wethinkagile
wethinkagile / gist:7077088
Last active December 26, 2015 02:19
jQuery Background Easing
<html>
<head>
<style>
#mask {
background-image:url('mask.jpg');
z-index:1;
}
</style>
</head>
@wethinkagile
wethinkagile / gist:7078316
Last active December 26, 2015 02:28
Build RPM of OpenSSH 5.6 for CentOS
rpm -qa | grep ssh
yum -y install gcc automake autoconf libtool make openssl-devel pam-devel rpm-build
wget http://ftp.halifax.rwth-aachen.de/openbsd/OpenSSH/portable/openssh-5.6p1.tar.gz
wget http://ftp.halifax.rwth-aachen.de/openbsd/OpenSSH/portable/openssh-5.6p1.tar.gz.asc
wget -O- http://ftp.halifax.rwth-aachen.de/openbsd/OpenSSH/portable/DJM-GPG-KEY.asc | gpg --import
gpg openssh-5.6p1.tar.gz.asc
tar zxvf openssh-5.6p1.tar.gz
cp openssh-5.6p1/contrib/redhat/openssh.spec /usr/src/redhat/SPECS/
cp openssh-5.6p1.tar.gz /usr/src/redhat/SOURCES/
cd /usr/src/redhat/SPECS/
@wethinkagile
wethinkagile / gist:7080880
Created October 21, 2013 09:10
SSH SFTP Chroot Jail
#Subsystem sftp /usr/lib64/misc/sftp-server
Subsystem sftp internal-sftp
AllowGroups fullssh sftponly
Match Group sftponly
ChrootDirectory /var/www/html/petes-website
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no
@wethinkagile
wethinkagile / gist:7511543
Created November 17, 2013 10:07
boundary value error
def odds_checker(value)
if value < 50:
print('odds are against')
elif value > 50:
print('odds are in favor')