Skip to content

Instantly share code, notes, and snippets.

View freundTech's full-sized avatar
🖥️

Adrian Freund freundTech

🖥️
View GitHub Profile
@freundTech
freundTech / ascii2bin.py
Created January 3, 2015 17:10
ascii2bin python script
import sys
if len(sys.argv) == 1:
text = raw_input("Please enter a text: ")
else:
text = ""
for i, arg in enumerate(sys.argv[1:]):
text += arg
if i < len(sys.argv)-2:
text += " "
@freundTech
freundTech / bin2ascii.py
Created January 3, 2015 17:11
bin2ascii python script
import sys
if len(sys.argv) == 1:
text = raw_input("Please enter binary data: ")
chars = text.split()
else:
chars = sys.argv[1:]
str_ = ""
@freundTech
freundTech / gist:93efc1ebddee719a6fc2
Last active August 29, 2015 14:12
[Outdated] JesperTheEnd Number Bot
i = setInterval(function() {
$oldNumber=$("#number").html();
$.ajax({
url: 'action.php',
type: 'POST',
data: {
action: "increase",
},
success: function(result) {
if($oldNumber<result){
@freundTech
freundTech / gist:6429dab2aa84b0a8a77f
Last active August 29, 2015 14:12
[Outdated] JesperTheEnd Number 1337-Bot
leet = 1337;
i = setInterval(function() {
$oldNumber=$("#number").html();
$oldNumber=parseInt($oldNumber);
if($oldNumber>leet) {
$action = "decrease";
} else if($oldNumber<leet) {
$action = "increase";
} else {
return;
@freundTech
freundTech / index.html
Last active August 29, 2015 14:12
Touch support for JesperTheEnd's number game
<!-- Don't forget to add this line to the head to disable zooming and scrolling on mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script>
var $tl=0,$intv,$txtColor="black",$time,$touch=false;
$(document).ready(function() {
post('request');
setInterval(tl,1000);
@freundTech
freundTech / arrayify-js.py
Last active August 29, 2015 14:16
Arrayify JS
import sys
d = {
'a': "([]+![])[![]+!![]]",
'b': "(typeof(![]))[![]+![]]",
'c': "([]+typeof([]))[!![]+!![]+!![]+!![]]",
'd': "([]+[][[]])[!![]+!![]]",
'e': "([]+!![])[!![]+!![]+!![]]",
'f': "([]+![])[![]+![]]",
'g': "([]+typeof([]+[[]]))[!![]+!![]+!![]+!![]+!![]]",
@freundTech
freundTech / ajax-fallback.php
Last active August 29, 2015 14:18
Ajax php fallback
<?php
ob_start();
chdir("./content");
$file = "./".$_GET["page"].".php";
if(!file_exists($file))
{
$file = "./404.php";
}
include($file);
@freundTech
freundTech / ajax.js
Last active August 29, 2015 14:18
ajax
$(document).ready(function() {
$("a").click(clicklink);
});
$(window).on("popstate", function(popstate) {
var link = popstate.originalEvent.state || "/";
openlink(link);
});
var clicklink = function() {
@freundTech
freundTech / palmreject.py
Last active August 29, 2015 17:47
surface palmreject
EDIT: Permanently moved to https://github.com/freundTech/surface-tools/tree/master/palmreject
@freundTech
freundTech / paste-in-browser-console.js
Last active August 30, 2015 11:57
Facebook auto poke
interval = setInterval(function() {
list = document.getElementsByTagName("a")
for(i = 0; i < list.length; i++) {
if(list[i].innerHTML.indexOf("Poke Back") > -1) {
list[i].click()
console.log("Poked someone")
}
}
}, 3000)