This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# imgcompare.sh | |
# | |
# Simple bash script to identify similar images | |
# in a directory. The script uses the great imagemagick | |
# tool suite to identify image formats, rescale images to same | |
# sizes before comparing and finally performs comparison | |
# and calculates an RMSE pixel error value for each image pair. | |
# | |
# Charalamapos Arapidis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mv ~/.Xauthority ~/.Xauthority_old | |
xhost + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sysctl -w vm.mmap_min_addr=0 abi.ldt16=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To Mass Storage: | |
setprop persist.sys.usb.config mass_storage,adb | |
echo '{path to shared partition; default=/dev/block/vold/179:17}' > {LUN_FILE} | |
To MTP: | |
echo '' > {LUN_FILE} | |
setprop persist.sys.usb.config mtp,adb | |
LUN_FILE: one of (preceeding preferred) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: text/html; charset=UTF-8"); | |
$q = NULL; | |
if (isset($_POST["q"])) { | |
$q = $_POST["q"]; | |
if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) | |
$q = stripslashes($q); | |
} | |
global $wpdb; | |
require_once("wp-load.php"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/init.h> | |
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/proc_fs.h> | |
#include <linux/pci.h> | |
#include <linux/delay.h> | |
#include <asm/uaccess.h> | |
#include <linux/dmi.h> | |
MODULE_LICENSE("GPL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _LUKE1337_UTF8_H | |
#define _LUKE1337_UTF8_H | |
#include <inttypes.h> | |
#include <stddef.h> | |
typedef uint32_t rune_t; | |
typedef uint16_t utf8dst_t; | |
/* if set, signifies an invalid sequence */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function process_reqs (reqs) { | |
var dependents = {}; // name -> [dependents] | |
var completed = {}; | |
var pending_cnts = {}; | |
var hasOwn = Object.prototype.hasOwnProperty; | |
var leaf_tasks = []; | |
for (var key in reqs) { | |
if (!hasOwn.call(reqs, key)) continue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function abstract_declarator(t,r){var w,a,$0,$1;a=C(r);if(a.pointer<t.length&&($0=this.pointer(t,a))){if(a.pointer<t.length)$1=this.direct_abstract_declarator(t,a);r.pointer=a.pointer;return{name:N,children:[$0,$1]};}a=C(r);$0=undefined;if(a.pointer<t.length&&($1=this.direct_abstract_declarator(t,a))){r.pointer=a.pointer;return{name:N,children:[$0,$1]};}return null;}function additive_expr(t,r){var w,a,$0,$1;a=C(r);if(a.pointer<t.length&&($0=this.multiplicative_expr(t,a))){for($1=[];a.pointer<t.length&&(w=this.additive_expr_i(t,a));$1[$1.length]=w);r.pointer=a.pointer;return{name:N,children:[$0,$1]};}return null;}function additive_expr_i(t,r){var w,a,$0,$1;a=C(r);if(a.pointer<t.length&&($0=this.TERMINAL(t,a,"+"))){if(a.pointer<t.length&&($1=this.multiplicative_expr(t,a))){r.pointer=a.pointer;return{name:N,children:[$0,$1]};}}a=C(r);if(a.pointer<t.length&&($0=this.TERMINAL(t,a,"-"))){if(a.pointer<t.length&&($1=this.multiplicative_expr(t,a))){r.pointer=a.pointer;return{name:N,children:[$0,$1]};}}return null;}fun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set("display_errors", 0); | |
$ver_outer = explode('-', PHP_VERSION); | |
$ver_info = explode('.', $ver_outer[0]); | |
$ver_major = intval($ver_info[0]); | |
$ver_minor = intval($ver_info[1]); | |
$ver_release = intval($ver_info[2]); | |
if ($ver_major < 7 || ($ver_major == 7 && | |
($ver_minor < 0 || ($ver_minor == 0 && |