Skip to content

Instantly share code, notes, and snippets.

View galenzhao's full-sized avatar

Galen Zhao galenzhao

View GitHub Profile
@irf266
irf266 / troubleshooting-rom-build-errors.markdown
Last active June 21, 2024 21:36
troubleshooting-rom-build-erros

Common Android build errors

Here are a list of build errors and their solutions that I've encountered since I started building custom ROMs. Execute these commands at the root of ROM folder.

I hope this will help others in fixing their build mistakes.

VINT compatibility check failed

Use compatible trees. For example, do not use Android 11 trees for building Android 12.

FAILED: /home/user/android/out/target/product/device_codename/dtb.img

Use proton-clang instead of pre-included clang.

@adamelso
adamelso / CheckoutWithPaypalContext.php
Created May 18, 2016 10:06
PayPal Express Checkout - Behat Mink UI test with Selenium 2 Driver
<?php
class CheckoutWithPaypalContext extends MinkContext
{
/**
* @When /^I choose to pay with PayPal$/
*/
public function iChooseToPayWithPayPal()
{
$this->findAndWaitForElementToBeVisibleThenClick("//a[@id = 'paypal']");
@52cik
52cik / npm.taobao.sh
Last active August 31, 2024 10:53
npm 淘宝镜像配置
npm set registry https://r.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像
npm set ELECTRON_MIRROR https://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像
@cgwxyz
cgwxyz / urldecode_encode.lua
Last active June 23, 2020 14:09
lua urlencode/urldecode
function encodeURI(str)
if (str) then
str = string.gsub (str, "\n", "\r\n")
str = string.gsub (str, "([^%w ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
str = string.gsub (str, " ", "+")
end
return str
end
@markusfisch
markusfisch / upnp.sh
Last active October 14, 2020 16:44
bash script to send a UPnP message
#!/usr/bin/env bash
# Send UPnP message
#
# @param 1 - host:port/query (optional when UPNP_URL is set)
# @param 2 - service#action (optional when UPNP_ACTION is set)
# @param 3 - message arguments in XML format (optional)
upnp_send()
{
# prefer arguments over presets