Skip to content

Instantly share code, notes, and snippets.

View cdfpaz's full-sized avatar

bzero cdfpaz

View GitHub Profile
{
"Id": 505,
"Copyright": "Copyright 2000-2021, MetaQuotes Ltd.",
"DataType": "Servers",
"FileTime": 0,
"ObjNumber": 2,
"Md5Key": "",
"sC0": "",
"s1A4": 0,
"s1A8": 0,
5c5
< File: /Users/anton/Documents/ifun/firmware/binary_unedited/mobileactivationd
---
> File: /Users/anton/Documents/ifun/firmware/mobileactivationd_2.bin
20960,20961c20960
< 0000000100013708 tbz w24, 0x0, loc_100013818
<
---
> 0000000100013708 nop
21032,21035c21031,21032
@cdfpaz
cdfpaz / attributes.rb
Created April 21, 2019 10:06 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@cdfpaz
cdfpaz / qemu_osx_rpi_raspbian_jessie.sh
Created January 26, 2018 11:01 — forked from hfreire/qemu_osx_rpi_raspbian_jessie.sh
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location

Keybase proof

I hereby claim:

  • I am bzero on github.
  • I am bzero (https://keybase.io/bzero) on keybase.
  • I have a public key ASBr1aoT2gtuuqlbPCnCIhRiqjREacjappXNtcOPh-VvqQo

To claim this, I am signing this object:

@cdfpaz
cdfpaz / gist:4cc02cf400b48d5214f76ed2ebcd3d8a
Created June 7, 2017 00:26
Convert jks file to PKCS12
Convert jks file to PKCS12:
keytool -importkeystore -srckeystore mycert.jks -destkeystore keystore.p12 -deststoretype PKCS12
/****************************************************************************
*
* Hello VBE!
*
*
* Language: C (Keyword far is by definition not ANSI, therefore
* to make it true ANSI remove all far references and
* compile under MEDIUM model.)
*
* Environment: IBM PC (MSDOS) 16 bit Real Mode
@cdfpaz
cdfpaz / latency.markdown
Created October 9, 2016 15:30 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@cdfpaz
cdfpaz / PinblockTool.java
Created May 17, 2016 18:36 — forked from Gilmor/PinblockTool.java
Pinblock ISO 9564 format 0
package cz.monetplus.mnsp.tools.misc;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang.StringUtils;
/**
* Tools for encoding a decoding pinblock
*
* @author Tomas Jacko <tomas.jacko [at] monetplus.cz>
#include <set>
#include <iostream>
#include <complex>
#include <algorithm>
#include <stdexcept>
template <typename T> int sgn(T val) {
return (T(0) < val) - (val < T(0));
}