Skip to content

Instantly share code, notes, and snippets.

View JasonHK's full-sized avatar
:octocat:
GitHub forever!

Jason Kwok JasonHK

:octocat:
GitHub forever!
View GitHub Profile
@sharunkumar
sharunkumar / adb-dns.bat
Created February 7, 2020 07:08
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com
@mrharel
mrharel / proxyTrack.js
Created December 28, 2018 14:24
Using Proxy to Track Javascript Class
const callerMap = {};
function getCaller(error) {
if (error && error.stack) {
const lines = error.stack.split('\n');
if (lines.length > 2) {
let match = lines[2].match(/at ([a-zA-Z\-_$.]+) (.*)/);
if (match) {
return {
name: match[1].replace(/^Proxy\./, ''),
@kherge
kherge / Example.java
Last active November 22, 2023 11:14
Null Coalescing in Java
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.Optional;
public class Example {
public static void main(String []args) {
// Create a series of nullable objects.
Test a = new Test();

Setup

  1. Enter the Nintendo WFC Settings menu, which can be found in any WFC-enabled game.

  2. Select "Nintendo Wi-Fi Connection Settings".

  3. Set up a new connection if you haven't already done so, then select the connection slot you wish to use.

  4. Scroll down and set "Auto-obtain DNS" to "No", then set Primary DNS to 178.62.43.212 and Secondary DNS to 0.0.0.0. Select "OK" to confirm.

@ebetancourt
ebetancourt / wp-disable-plugin-update.php
Last active June 6, 2024 09:57 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
<?php
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
@JokingChicken
JokingChicken / SHA-256.js
Last active February 17, 2019 13:01
SHA-256 implementation in JavaScript
/**
* SHA-256 hash function reference implementation.
*
* This is an annotated direct implementation of FIPS 180-4, without any optimisations.
* it is intended to aid understanding of the algorithm rather than for production use!!!
*
* While it could be used where performance is not critical, I would recommend using the ‘Web
* Cryptography API’ (developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest) for the browser,
* or the ‘crypto’ library (nodejs.org/api/crypto.html#crypto_class_hash) in Node.js.
*
@it9gamelog
it9gamelog / it-trans.markdown
Last active April 1, 2024 06:04
香港、中国内地IT詞彙對照表

一般

English 香港 中国内地
CPU CPU 处理器
RAM RAM, 記憶體 内存
Display Card Display 显卡
Monitor 屏、屏幕
Touch Screen Touch Screen 触摸屏
Power Supply 火牛 电源
@Tomcc
Tomcc / runtimeid_table.json
Last active August 20, 2021 23:57
RuntimeID temporary static lookup table
[
{
"data": 0,
"id": 0,
"name": "minecraft:air",
"runtimeID": 0
},
{
"data": 0,
"id": 1,
@BaReinhard
BaReinhard / VSCodeCPPSetup.md
Last active March 7, 2024 12:26
A Basic Setup for using VS Code with C++ 11 for CSIT Data Structures

Setting Up VS Code for C++ 11

This is for students who are running on a Non-Microsoft OS, or students who would rather use a lighter weight IDE

  1. First download VS Code and install it.

  2. Install a C++ extension in VS Code VS Code Extensions *The extension button is the square logo on the

@doggy8088
doggy8088 / Angular 18 Dev Setup.md
Last active May 24, 2024 16:20
Angular 18 開發環境說明

Angular 18 開發環境說明

為了能讓大家能夠順利的建立起 Angular 18 開發環境,以下是需要安裝的相關軟體與安裝步驟與說明。

Angular LOGO

[ 作業系統 ]

  • Windows 10 以上版本
  • Mac OS X 10.6 以上版本