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
from pathlib import Path | |
import io | |
import sys | |
data = Path(sys.argv[1]).read_bytes() | |
l = len(data) | |
for index, b in enumerate(data): | |
if (b == 0x42 and data[index+1] == 0x4D): | |
x = int.from_bytes(data[index+2:index+6], byteorder="little", signed=False) |
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
# Push commits to LOS Gerrit | |
git push ssh://<gerrit-user-id>@review.lineageos.org:29418/LineageOS/<repo-name> HEAD:refs/for/<branch> | |
# Install change-id hooks first: | |
gitdir=$(git rev-parse --git-dir); scp -O -p -P 29418 <gerrit-user-id>@review.lineageos.org:hooks/commit-msg ${gitdir}/hooks/ |
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
Show hidden characters
{ | |
"shell_cmd": "C:\\msys64\\usr\\bin\\env MSYSTEM=MINGW64 c:\\msys64\\usr\\bin\\bash -l -c \"cd \\$(cygpath -u '${folder:${project_path:${file_path}}}') && make\"", | |
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${folder:${project_path:${file_path}}}", | |
"selector": "source.makefile", | |
"syntax": "Packages/Makefile/Make Output.sublime-syntax", | |
"keyfiles": ["Makefile", "makefile"], | |
"variants": | |
[ |
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
import json | |
import urllib | |
import urllib.request | |
import os | |
import sys | |
import hashlib | |
# BUF_SIZE is totally arbitrary, change for your app! | |
BUF_SIZE = 65536 # lets read stuff in 64kb chunks! |
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
center=128 | |
width=127 | |
freq=0.06 | |
rainbow() { | |
R=$(bc -l <<< "scale=2;s($freq*$1+2)*$width+$center") | |
G=$(bc -l <<< "scale=2;s($freq*$1+0)*$width+$center") | |
B=$(bc -l <<< "scale=2;s($freq*$1+4)*$width+$center") | |
echo "\x1b[38;2;${R%.*};${G%.*};${B%.*}m" | |
} |
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
var Discordie = require("discordie"); | |
var client = new Discordie(); | |
var fs = require("fs"); | |
client.connect({ token: "" }); | |
client.Dispatcher.on("GATEWAY_READY", e => { | |
console.log("Connected as: " + client.User.username); | |
}); |
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
11345920 > 10855680 - 270336 | |
11341824 | |
**Hack this to use precompiled kernel** | |
[build/core/Makefile]:1109 | |
recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system | |
TARGET_KERNEL_SOURCE | |
./device/motorola/msm8226-common/BoardConfigCommon.mk:50:TARGET_KERNEL_SOURCE := kernel/motorola/msm8226 | |
./vendor/lineage/build/tasks/kernel.mk:24:# TARGET_KERNEL_SOURCE = Kernel source dir, optional, defaults |
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
/* | |
+(c) 2017*/ | |
#define /**/C(c/* | |
*/)char *o= #c;c | |
C(typedef char w;w* | |
t=" oh##! ]j% #f&" | |
"$ !j%&a^ )$! cc)" | |
"b ]$#_$$ !da )$_" | |
"^ %#]_#%! cb# $]'" | |
"a %b#%!i## ]]' #]_" |
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
--- hardware/qcom/fm/fm_hci/Android.mk.orig 2018-01-08 23:23:37.000000000 +0100 | |
+++ hardware/qcom/fm/fm_hci/Android.mk 2018-01-09 19:24:52.341528746 +0100 | |
@@ -13,8 +13,8 @@ | |
libhidltransport \ | |
libhwbinder \ | |
liblog \ | |
- libutils \ | |
- [email protected] | |
+ libutils | |
+# [email protected] |
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
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext('2d'); | |
var alert = document.getElementById("alert"); | |
var pollX = 90; | |
var rocket = { | |
x: pollX, | |
y: canvas.height-100, | |
lastx: 0, |
NewerOlder