Skip to content

Instantly share code, notes, and snippets.

@hako
hako / build_llvm.sh
Created December 3, 2018 08:59
build_llvm.sh
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ../..
cd llvm/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
cd ../../../..
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/lld/trunk lld
cd ../..
@hako
hako / sepsplit.c
Created August 17, 2017 20:49 — forked from xerub/sepsplit.c
/*
* SEP firmware split tool
*
* Copyright (c) 2017 xerub
*/
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
uncorrectable error :
mtd->read(0x1fb28 bytes from 0x16204d8) returned ECC error
jffs2_scan_inode_node(): CRC failed on node at 0x0163a748: Read 0xfa12f935, calculated 0x2a93baea
uncorrectable error :
mtd->read(0x1fb58 bytes from 0x16604a8) returned ECC error
uncorrectable error :
mtd->read(0x1f970 bytes from 0x1a80690) returned ECC error
uncorrectable error :
mtd->read(0x1f7c4 bytes from 0x1ae083c) returned ECC error
uncorrectable error :
@hako
hako / GAME_MASTER_v0_1.protobuf
Created July 17, 2016 05:11 — forked from anonymous/GAME_MASTER_v0_1.protobuf
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@hako
hako / kanye-ispum.py
Created March 24, 2016 22:02
kanye-ispum.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# A kanye-ipsum port to python.
# https://github.com/tylucaskelley/kanye-ipsum
import random
import re
import sys
@hako
hako / sirius-diy-tutorial.md
Last active September 27, 2024 04:55
Installing Sirius on Mac / Linux / Raspberry Pi

Installing Sirius on Mac / Linux / Raspberry Pi

Tested working on:

  • Raspberry Pi 1 Model B+ (Using Docker hypriot/rpi-python) (debian/wheezy)
  • Raspberry Pi 2 Model B (with virtualenv)
  • Ubuntu Linux x64 (with virtualenv)
  • Ubuntu Linux x64 (Using Docker)
  • OS X Yosemite (with virtualenv)
@hako
hako / peachy.sh
Last active January 19, 2016 21:28
Peach App token does not expire. (Note I've 'logged out' from the app and this token is not invalidated.)
curl -X "GET" "https://v1.peachapi.com/connections" \
-H "Accept: application/json " \
-H "Host: v1.peachapi.com" \
-H "Connection: keep-alive" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0NTMwNTU4MDksInN0cmVhbUlEIjoiNmIwNjFiZTQzYjc5NDk0NGE3MmYyNGNmMzBlMjczZWYifQ.bd9O5Rf9rg7s2rhbBtXEajFxu5X9Xg1IQwppTPKc19Q" \
-H "User-Agent: Peach App/1.0.11 (iPhone; iOS 8.0.2; Scale/2.00)"
@hako
hako / docx2md.md
Created September 28, 2015 15:59 — forked from carloscasalar/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@hako
hako / httppp.rb
Last active August 29, 2015 14:07 — forked from alyssais/httppp.rb
require 'java'
require 'sinatra'
def keycode(key)
name = "VK_#{key.upcase}"
java.awt.event.KeyEvent.const_get(name)
end
robot = java.awt.Robot.new

Keybase proof

I hereby claim:

  • I am hako on github.
  • I am hako (https://keybase.io/hako) on keybase.
  • I have a public key whose fingerprint is C36D 5CCA 0028 4BE2 89F8 3922 D9F3 0A32 9022 8821

To claim this, I am signing this object: