Skip to content

Instantly share code, notes, and snippets.

綺麗な賢狼ホロ KireinaHoro

Block or report user

Report or block KireinaHoro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@KireinaHoro
KireinaHoro / system.diff
Last active Oct 6, 2018
DPT-RP1 system diff
View system.diff
diff --git a/system-orig/build.prop b/system-new/build.prop
index 6afadb0..1f57459 100644
--- a/system-orig/build.prop
+++ b/system-new/build.prop
@@ -10,11 +10,11 @@ ro.build.version.all_codenames=REL
ro.build.version.release=1.2.02.07211
ro.build.date=Fri Jul 21 17:15:08 JST 2017
ro.build.date.utc=1500624908
-ro.build.type=user
+ro.build.type=userdebug
@KireinaHoro
KireinaHoro / bootimg.diff
Last active Oct 6, 2018
DPT-RP1 boot.img diff
View bootimg.diff
diff --git a/orig/boot.img b/new/boot.img
index cdcfca4..15a594e 100644
Binary files a/orig/boot.img and b/new/boot.img differ
diff --git a/orig/bootimg.cfg b/new/bootimg.cfg
index 42eaa62..fc7b66f 100644
--- a/orig/bootimg.cfg
+++ b/new/bootimg.cfg
@@ -5,5 +5,5 @@ ramdiskaddr = 0x11000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
@KireinaHoro
KireinaHoro / arpa_inet_h-in_addr_t-definition.patch
Created Jul 24, 2018
Patch for Bionic headers for missing definition
View arpa_inet_h-in_addr_t-definition.patch
--- arpa/inet.h.old 2018-07-25 00:19:42.423809828 +0800
+++ arpa/inet.h 2018-07-25 00:18:14.071813451 +0800
@@ -36,6 +36,8 @@
__BEGIN_DECLS
+typedef uint32_t in_addr_t;
+
in_addr_t inet_addr(const char* __s);
int inet_aton(const char* __s, struct in_addr* __addr);
@KireinaHoro
KireinaHoro / bootstrap.sh
Last active Jul 26, 2018
Bootstrap aarch64-linux-android clang/llvm toolchain with sanitizers support
View bootstrap.sh
#!/bin/bash
# script that creates clang/llvm cross toolchain for aarch64 android target
# compile a hello world program that runs on AOSP Android:
# test with: adb push hello /data/cache && adb shell /data/cache/hello
# GCC:
# C: aarch64-linux-android-gcc hello.c -o hello -pie
# C++: aarch64-linux-android-g++ hello.cc -o hello -pie -fPIC -static-libgcc \
# -nostdlib -L/usr/local/aarch64-linux-android/lib -lc++ -lc -nostdinc++ \
# -I/usr/local/aarch64-linux-android/include/c++/v1 -std=c++11
# Clang/LLVM:
@KireinaHoro
KireinaHoro / local.conf
Created Jul 14, 2018
Working fontconfig
View local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Turn off embedded font -->
<match target="font">
<edit name="embeddedbitmap" mode="assign">
<bool>false</bool>
</edit>
</match>
@KireinaHoro
KireinaHoro / main.py
Created May 19, 2018
FightTheLandlord
View main.py
#!/usr/bin/env python
# FightTheLandlord Artificial Stupidity
# Version 0
# 2018 Pengcheng Xu, Junjie Shan, Zixin Zhou
# All rights reserved.
# TODO 判斷是用大牌打地主還是清理散牌
# TODO 給牌型排序(設計估值函數)
# TODO 計算打出牌型的分值
# TODO 儘量選長的牌出
View TGFont.json
{
"fonts": {
"MS UI Gothic": {
"replace": "源ノ角ゴシック Medium",
"#italic": false,
"#underLine": false,
"#strikeOut": false
},
"Open Sans": {
"replace": "Source Sans Variable Regular",
@KireinaHoro
KireinaHoro / playground.py
Created May 6, 2018
FrozenLake test tensorflow
View playground.py
import gym
import numpy as np
import tensorflow as tf
env = gym.make('FrozenLake-v0')
tf.reset_default_graph()
# establish the feed-forward part of the network used to choose actions
inputs1 = tf.placeholder(shape=[1, 16], dtype=tf.float32)
@KireinaHoro
KireinaHoro / config-4.9.95-gentoo
Created May 4, 2018
Kernel configuration for Gentoo in Hyper-V
View config-4.9.95-gentoo
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.9.95-gentoo Kernel Configuration
#
#
# Gentoo Linux
#
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_UDEV=y
@KireinaHoro
KireinaHoro / main.cpp
Created Apr 21, 2018
WarCraft assignment final version
View main.cpp
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <vector>
// useless headers
#include <cstring>
#define SIDE(x) ((x)->getTerritory() ? "red" : "blue")
You can’t perform that action at this time.