Skip to content

Instantly share code, notes, and snippets.

View zekesonxx's full-sized avatar

Zoey Mertes zekesonxx

  • Seattle, WA
View GitHub Profile
@zekesonxx
zekesonxx / amusingheaders.js
Created June 1, 2014 08:48
Amusing header middleware for your Connect/Express project. Should be easily portable to other languages.
app.use(function (req, res, next) {
function atRandom (opt) {
var selected = Math.floor(Math.random()*(opt.length));
return opt[selected];
}
//amusing headers
var servers = [
'Apache',
@zekesonxx
zekesonxx / originalversion.vb
Last active August 29, 2015 13:57
A really stupid ASCII rotation method that was advertized as encryption.
Public Function EncryptDecrypt(ByVal text1 As String, ByVal key As String, ByVal isEncrypt As Boolean) As String
Dim char1 As String
Dim char2 As String
Dim cKey As Byte
Dim strLength As Integer
Dim Result As String = ""
Dim j As Integer = -1
If text1 <> "" And IsNumeric(key) Then
strLength = text1.Length
For i As Integer = 0 To strLength - 1
_____ _____
/|--| \ / |--|\
/ |--| \ / |--| \
/ |--| \ / |--| \
|--| \ / |--|
|--| \ / |--|
|--| \/ |--|
---|--|--------------|--|---
| |--| | | | | |--| |
---|--|--------------|--|---
@zekesonxx
zekesonxx / explain.js
Created February 3, 2014 23:46
Why I hate Angular and indenting
if (true) {
"This makes sense, because the } closes the if"
}
command.function(1, 4, function() {
"This also makes sense, because it is a async callback"
});
angular.hasStupidPatterns('CtrlThis', ['$scope', '$http', function($scope, $http) {
"This looks ugly"
@zekesonxx
zekesonxx / index.js
Created January 10, 2014 22:21
USD Currency Checker
/**
* USD Currency Checker
* Checks a article of currency if it has been used in a fradulent transaction.
* @author Zeke Sonxx (https://github.com/zekesonxx)
* @license MIT
*/
/**
* Checks a USD bill for fradulant activity
<!DOCTYPE html>
<head>
<title>Testing</title>
<meta charset="UTF-8">
</head>
<body>
<p class="example-class">Example Text</p>
</body>
@zekesonxx
zekesonxx / mcping.php
Created October 1, 2011 06:01 — forked from barneygale/gist:1235274
Edit of barneygale's PHP Minecraft Server Pinger
<?php
$host = $_GET['ip'];
$port = $_GET['port'];
function pingserver($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");