- IPv6
- HTML5
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 | |
// needs password_hash from php 5.5 OR compat library from | |
// https://github.com/ircmaxell/password_compat | |
require("./password_compat/lib/password.php"); | |
$i = 10; | |
while($i<20) { | |
$time_start = microtime(true); | |
$password = "password001234567890"; | |
$hash = password_hash($password, PASSWORD_BCRYPT, array("cost" => $i)); | |
$time_end = microtime(true); |
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 | |
# router name generator | |
# [ omachonu ogali / oogali at blip dot tv / @oogali ] | |
# | |
# README: | |
# 1. point at your router with a community | |
# 2. finesse names as needed into your DNS zones | |
# 3. have a cold beverage of your choosing. | |
# |
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 | |
// simple example | |
$bcast = ip2long("192.168.178.41"); | |
$smask = ip2long("255.255.255.0"); | |
$nmask = $bcast & $smask; | |
echo long2ip($nmask); // Will give 192.168.178.0 | |
echo "\n"; | |
?> |
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 | |
function gethostbyname6($host, $try_a = false) { | |
// get AAAA record for $host | |
// if $try_a is true, if AAAA fails, it tries for A | |
// the first match found is returned | |
// otherwise returns false | |
$dns = gethostbynamel6($host, $try_a); | |
if ($dns == false) { return false; } |
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
from ConfigParser import SafeConfigParser | |
parser = SafeConfigParser() | |
parser.read('etc/unifi.cfg') | |
username = parser.get('unifi', 'username') | |
password = parser.get('unifi', 'password') |
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 | |
function usage () | |
{ | |
echo "Usage:" | |
echo " $0 <IP>" | |
echo "OR" | |
echo " $0 <IP> | tee mylog.txt" | |
} |
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 | |
function usage () | |
{ | |
echo "Usage:" | |
echo " $0 <IP6>" | |
echo "OR" | |
echo " $0 <IP6> | tee mylog.txt" | |
} | |
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 | |
function usage () | |
{ | |
echo "Usage:" | |
echo " $0 <IP6 | hostname>" | |
echo "OR" | |
echo " $0 <IP6 | hostname> | tee mylog.txt" | |
} |
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
mysqladmin -uroot -p create DBNAME | |
mysql -uroot -p -e "GRANT ALL PRIVILEGES ON DBNAME.* To 'USER'@'localhost' IDENTIFIED BY 'PASSWORD';" |
OlderNewer