Skip to content

Instantly share code, notes, and snippets.

View aonic's full-sized avatar

Raja Kapur aonic

  • AWS
  • Seattle, WA
View GitHub Profile
<?php
function purge_experiment($experiment_id) {
$fp = fsockopen("192.168.156.237", 6082, $errno, $errstr, 1);
if (!$fp) {
return false;
} else {
$out = "purge obj.http.X-Exp == $experiment_id\n";
fwrite($fp, $out);
fclose($fp);
#!/bin/bash
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Two-Finger Scrolling' 8 1
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Two-Finger Scrolling' 8 1 1
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Two-Finger Pressure' 32 10
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Two-Finger Width' 32 8
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Edge Scrolling' 8 0 0 0
<embed width="0" height="0" allowscriptaccess="always" name="flashSock" id="flashSock"
src="./swf/jsCom.swf" type="application/x-shockwave-flash"></embed>
<script type="text/javascript">
var onData = function(data) {
alert('Server said:' + data);
}
var onClose = function() {
alert('Goodbye.');
}
<embed width="0" height="0" allowscriptaccess="always" name="flashSock" id="flashSock"
src="./swf/jsCom.swf" type="application/x-shockwave-flash"></embed>
<script type="text/javascript">
var onData = function(data) {
alert('Server said:' + data);
}
var onClose = function() {
alert('Goodbye.');
}
<?php
//$url['url'] is the URL as saved in urls table, it has * in it
$temp = preg_quote($url['url'], '/');
$temp = str_replace('\\*','(.*?)',$temp); //Replacing * with (.*?)
$urlToMatch = "/^{$temp}$/"; //Adding /^ and $/ to make preg_match work, ^ and $ are important
//Part taken from old code
$page_requesting = remove_last_slash(remove_index_etc(strip_www($page_requesting)));
/**
*
*/
package example05;
import java.util.Scanner;
/**
* @author pajensen
@aonic
aonic / gist:828284
Created February 15, 2011 21:26 — forked from anonymous/gist:828273
<?php
//ICE //William Mantly //willaim@aonic.net //5-2-07
//session_start();
if("4"=="4"){
include("mysql.php"); //conects to D
array_map('addslashes', $_GET);
@aonic
aonic / gist:831945
Created February 17, 2011 15:46
trying out scala
package scalaapplication1
import java.io._
import java.util.Scanner
import javax.swing.JFileChooser
import javax.swing.JOptionPane
object Main {
def main(args: Array[String]): Unit = {
<?php
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$username = 'dispatch@gbfd.net';
$password = '';
/* try to connect */
$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());
/* grab emails */
[9] boris> $hits;
→ array(
0 => array(
'hit' => array(
'name' => 'Alice'
)
),
1 => array(
'hit' => array(
'name' => 'John'