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
#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
<?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
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
#!/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
#!/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/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/bash | |
spin=("|" "/" "-" "\\");((i=j=0,n=$(tput cols)-10)) | |
echo -ne "\r"; tput sc | |
trap "echo;exit 0" SIGTERM SIGINT SIGHUP | |
while true;do tput rc;s="\r${spin[$i]} ";k=0;while [[ $k -lt $((j < 0 ? -j - 1 : j)) ]]; do | |
if [[ $j -ge 0 ]] | |
then s=$s"=";else s=$s" ";fi;((++k));done;((i++)) | |
if [[ $j -lt 0 ]];then ((--j));else ((++j)); fi; if [ $i -ge ${#spin[@]} ]; then i=0;fi | |
if [ $j -ge $n ]; then j=-1;else if [ $((-j)) -gt $n ]; then j=0; fi; fi; | |
printf "$s";sleep 0.05;read -t 0.0001 -n 1 -s ans;if [ "$ans" == "q" ];then break;fi;done;echo; |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/ioctl.h> | |
#include <fcntl.h> | |
#include <libgen.h> | |
#include <linux/cdrom.h> |
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 <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main (void) | |
{ | |
int fd, fail; |