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
// Marcos Vives Del Sol - 17/IX/2013 | |
// License: WTFPL | |
import java.lang.reflect.Constructor; | |
public class FastHex { | |
private static Constructor<String> STRING_CONSTRUCTOR = null; | |
private static final char[] HEX_CHAR = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; | |
public static final String hex(byte[] data) { | |
// Cache to reduce field access |
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
public class BlockAreaSet implements Set<Block> { | |
private final World world; | |
private final int baseX; | |
private final int baseY; | |
private final int baseZ; | |
private final int sizeX; | |
private final int sizeY; |
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 -e | |
odbin() { | |
od --output-duplicates --address=none --endian=little $* | |
} | |
rdu32() { | |
odbin --format d4 --skip-bytes "$2" --read-bytes 4 "$1" | tr -c -d [:digit:] | |
} |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import urllib.request | |
import urllib.parse | |
import json | |
import re | |
import time | |
import threading |
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 | |
RTFM=" | |
PLEASE READ THE FUCKING MANUAL | |
NO, REALLY, | |
███████▄▄ ██████████ ██████████ ██▄▄ ▄▄██ | |
██ ▀▀█▄ ██ ██ ██▀██▄ ▄██▀██ | |
██ ██ ██ ██ ██ ▀██▄██▀ ██ | |
██ ▄██▀ ██ ██ ██ ▀█▀ ██ |
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 | |
# Fail on error | |
set -e | |
cd "$(dirname "$0")" | |
Version=buster | |
BootPart=/home/marcos/rpibuild/fat.bin | |
RootPart=/dev/sdb1 |
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
#define RW_PIN 7 | |
#define PHI_PIN 8 | |
#define RST_PIN 9 | |
#define SYNC_PIN 6 | |
int DATA_PINS[] = { 10, 11, 12, 13, A0, A1, A2, A3 }; | |
void ph8(uint8_t x) { | |
if (x < 0x10) { |
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
#!/usr/bin/env python3 | |
import argparse | |
import requests | |
import sys | |
from lxml import html | |
parser = argparse.ArgumentParser(description='Retrieves IP from EPC3825 routers.') | |
parser.add_argument('--base', help='Base router prefix', default='http://192.168.0.1') | |
parser.add_argument('username', help='Administration user name') |
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 -e | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 device" | |
exit 1 | |
fi | |
SectorCount=$(( `blockdev --getsize "$1"` - 1 )) | |
echo -n "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/sh | |
### BEGIN INIT INFO | |
# Provides: dns-tor | |
# Required-Start: $remote_fs $network tor | |
# Required-Stop: $remote_fs $network tor | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: DNS over Tor | |
# Description: Domain Name Resolution over Tor |
OlderNewer