Skip to content

Instantly share code, notes, and snippets.

View 6footGeek's full-sized avatar
🚀

Andy Barlow 6footGeek

🚀
View GitHub Profile
@6footGeek
6footGeek / dup-button-form.html
Created March 4, 2020 11:19
Simple html form with duplicate buttons testing default type behaviour
<!DOCTYPE html>
<html>
<body>
<form action="" method="get">
<input type="text" id="name" name="name" value="modify me...."><br>
<button name="clicked" value="One">I Submit</button>
<button type="reset" name="clicked" value="Two">I Reset</button>
<button name="clicked" value="Three">I submit</button>
</form>
</body>
usort($data, function ($a, $b) {
return ip2long($a[0]) - ip2long($b[0]);
});
@6footGeek
6footGeek / ipToAsnLookup.php
Created August 23, 2017 09:54
IP to ASN lookup PHP
private function getAsnFromIP($ip)
{
$query = 'whois -h whois.cymru.com " -f ' . (string) $ip . '"';
$whoisResult = shell_exec($query);
$asnArray = explode('|', $whoisResult);
$cleanAsn = array_map('trim', $asnArray);
return $cleanAsn;
}
@6footGeek
6footGeek / describe-it.js
Created May 16, 2017 12:29 — forked from shamasis/describe-it.js
mocha/jasmine compatible test framework for postman test scripts (in less than 1KB minified)
/**
* @module describe-it
*
* This module defines global variables to provide unit test case runner functions compatible with mocha and jasmine.
* The codebase is written for brevity and facilitate being as lightweight as possible.
*
* The code is intended to be included in Postman Test Sandbox.
*/
/**
1: In a CMD window:
setx PATH "%PATH%;C:\Users\YOUR_USER_HERE\AppData\Local\Programs\Python\Python36-32\Scripts"
2: Close instance of CMD
3: Open new instance of CMD
4: $$$
SET TL_PANEL=C:\
SET TR_PANEL=C:\
SET BL_PANEL=C:\
SET BR_PANEL=C:\
start ConEmu -cmdlist powerShell -cur_console:fn:d:%TL_PANEL% ^|^|^| powerShell -cur_console:s1TVnd:%BL_PANEL% ^|^|^| cmd -cur_console:s1THnd:%TR_PANEL% ^|^|^| powerShell -cur_console:s2THnd:%BR_PANEL%
@6footGeek
6footGeek / CSS fullscreen image background on any device.css
Last active May 24, 2016 08:41
CSS fullscreen image background on any device
html{
height:100%;
width:100%;
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
@6footGeek
6footGeek / simple Java swing GUI
Created February 8, 2015 18:48
really simple Java GUI using swing boilerplate
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class simpleGUI extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
### Keybase proof
I hereby claim:
* I am 6footgeek on github.
* I am 6footgeek (https://keybase.io/6footgeek) on keybase.
* I have a public key whose fingerprint is 6F4C 2EC0 A219 F442 C22C 6FD7 2A2A A6EB 35FB 1CD8
To claim this, I am signing this object: