This file contains hidden or 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 <openssl/blowfish.h> | |
#include <openssl/md5.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#define TOKENS "\r \n " | |
#define DIRECTION 1 | |
#define SRCDATA 2 |
This file contains hidden or 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
mikrotik rooten | |
wget -c https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/mikrotik/openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf | |
wget -c https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/mikrotik/openwrt-15.05-ar71xx-mikrotik-vmlinux-lzma.elf | |
wget -c https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/mikrotik/openwrt-15.05-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz | |
ln -s openwrt-15.05-ar71xx-mikrotik-vmlinux-lzma.elf openwrt-ar71xx-mikrotik-vmlinux-lzma.elf | |
ln -s openwrt-15.05-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz openwrt-ar71xx-mikrotik-rootfs.tar.gz | |
wget https://busybox.net/downloads/binaries/1.21.1/busybox-mips | |
python -m http.server & |
This file contains hidden or 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
function http(url, method, data){ | |
return new Promise(function(resolve, reject) { | |
var xhr; | |
if(method == undefined) method = data ? "POST" : "GET"; | |
try { | |
xhr = new XMLHttpRequest(); | |
} catch (e) { | |
xhr = new ActiveXObject("Msxml2.XMLHTTP"); | |
} |
This file contains hidden or 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
# Definitions from the exercise | |
avg_packet_size = 400 | |
edge_def = """ | |
Edge Dist C_bps | |
AB 1 20000 | |
BC 3 10000 | |
AD 2 20000 | |
BE 5 20000 | |
CE 2 30000 |
This file contains hidden or 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 | |
// Include this in your scripts where REMOTE_ADDR is used | |
function check_ip_range($ip, $rangeFile) { | |
$bin = inet_pton($ip); | |
$adrlen = strlen($bin); | |
if ($adrlen == 16) { //IPv6 | |
$rangeFile.=".ipv6"; | |
} else { | |
$rangeFile.=".ipv4"; |
This file contains hidden or 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
// ==UserScript== | |
// @name HexTweets | |
// @version 1 | |
// @grant none | |
// @match https://twitter.com/* | |
// ==/UserScript== | |
var re = /^#[a-fA-F0-9]{6}$/; | |
var hashtags = document.querySelectorAll("div.tweet a.twitter-hashtag"); | |
for(var i in hashtags) { |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# Control Dell P4317Q monitor over RS232 | |
# usage examples: | |
# read monitor name string and brightness: ./dell_P4317Q_ctrl.py eb01 eb30 | |
# set brightness to minimum: ./dell_P4317Q_ctrl.py ea3000 | |
# set brightness to maximum: ./dell_P4317Q_ctrl.py ea30ff | |
# night mode: ./dell_P4317Q_ctrl.py eb01 ea3000 ea3133 ea4800010000 | |
This file contains hidden or 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
THE LOW-DOWN ON LOADALL: | |
EXCERPTS FROM THE BOOK | |
THE HYPER-SPACE NAVIGATOR'S GUIDE | |
by | |
Terrance E. Hodgins | |
copyright (C) 1990 by Terrance E. Hodgins, | |
All rights reserved. |
This file contains hidden or 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
// library: Infrared | |
// Sends Rc5 0/1 twice with different toggle values. | |
// Turns e.g. a Philips TV to channel 11. | |
#include <Rc5Renderer.h> | |
#include <IrSenderNonMod.h> | |
static IrSenderNonMod sender(3); | |
IrSignal *signal ; |
This file contains hidden or 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
(wp post list --post_type=product_variation --meta_key=_downloadable_files --fields=ID | tail -n +2; | |
wp post list --post_type=product --meta_key=_downloadable_files --fields=ID | tail -n +2) | ( | |
while read ID; do wp post meta get $ID _downloadable_files ; done) |