For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| #!/bin/sh | |
| # | |
| # init.d script with LSB support. | |
| # | |
| # Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org> | |
| # | |
| # This is free software; you may redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as | |
| # published by the Free Software Foundation; either version 2, | |
| # or (at your option) any later version. |
| // | |
| // !!WARNING: Not recommended for production code!! | |
| // | |
| public class ClassLoaderActivity extends Activity | |
| { | |
| public void onCreate(Bundle savedInstanceState) | |
| { | |
| // file.jar has a dex'd "classes.dex" entry that you can generate with "dx" from any number of JARs or class files | |
| ClassLoader dexLoader = new DexClassLoader("/path/to/file.jar", getCacheDir().getAbsolutePath(), null, getClassLoader()); | |
| setAPKClassLoader(dexLoader); |
| public class MonoWebFormViewEngine : WebFormViewEngine | |
| { | |
| protected override bool FileExists(ControllerContext controllerContext, string virtualPath) | |
| { | |
| return base.FileExists(controllerContext, virtualPath.Replace("~", "")); | |
| } | |
| } | |
| public class MonoRazorViewEngine : RazorViewEngine | |
| { |
| location = /favicon.ico { | |
| log_not_found off; | |
| access_log off; | |
| } | |
| location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
| expires max; | |
| log_not_found off; | |
| } |
| <?php | |
| function ping($host, $port=25565, $timeout=30) { | |
| //Set up our socket | |
| $fp = fsockopen($host, $port, $errno, $errstr, $timeout); | |
| if (!$fp) return false; | |
| //Send 0xFE: Server list ping | |
| fwrite($fp, "\xFE"); | |
| import com.google.common.base.MoreObjects; | |
| import com.google.common.base.Objects; | |
| public class Address { | |
| ... | |
| @Override | |
| public boolean equals(Object obj) { |
| var myConfObj = { | |
| iframeMouseOver : false | |
| } | |
| window.addEventListener('blur',function(){ | |
| if(myConfObj.iframeMouseOver){ | |
| console.log('Wow! Iframe Click!'); | |
| } | |
| }); | |
| document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){ |
| # Upstart script for a play application that binds to an unprivileged user. | |
| # put this into a file like /etc/init/play.conf | |
| # | |
| # This could be the foundation for pushing play apps to the server using something like git-deploy | |
| # By calling service play stop in the restart command and play-start in the restart command. | |
| # | |
| # Usage: | |
| # start play | |
| # stop play | |
| # restart play |
| package com.willowtreeapps.demo; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.view.KeyEvent; | |
| import android.view.Window; | |
| import android.webkit.WebView; | |
| import android.webkit.WebViewClient; | |
| public class MainActivity extends Activity { |