Skip to content

Instantly share code, notes, and snippets.

View thyrlian's full-sized avatar
🏀
🎽🩳👟

Jing Li thyrlian

🏀
🎽🩳👟
View GitHub Profile
@prologic
prologic / LearnGoIn5mins.md
Last active April 30, 2024 15:10
Learn Go in ~5mins
@thyrlian
thyrlian / TelekomGlasfaser.md
Last active January 4, 2024 08:09
Telekom Glasfaser (MagentaZuhause)
@thyrlian
thyrlian / JavaScriptEventLoop.md
Last active April 28, 2018 09:57
JavaScript Event Loop

Note-taking for What the heck is the event loop anyway? by Philip Roberts.

JavaScript: a single-threaded, non-blocking, asynchronous, concurrent language.

JavaScript has a call stack, an event loop, a callback queue, some other APIs and stuff.

V8 has a call stack and a heap.

DOM, Ajax (XMLHttpRequest), setTimeout are from Web APIs provided by browser.

@cunneen
cunneen / Readme.md
Last active January 23, 2024 11:17
Install Open GApps In Android Emulator

Introduction

This works to install Open GApps into the Android Emulator, working around the issue where the system partition is too small.

With it, I can get Google Play installing into the emulator. Tested on KitKat (API 19), Lollipop (API 21) and Oreo (API 27).

It's tested on MacOS.

Instructions

@dalegaspi
dalegaspi / brew_symlink_error_sierra.md
Last active January 4, 2024 22:32
Homebrew Symlink errors in Mac OSX High Sierra
@thyrlian
thyrlian / KaliNetHunterForNexus9.md
Last active November 2, 2022 22:33
How to build & install Kali NetHunter on Nexus9 from macOS

Prerequisites

  • Enable USB debugging (and allow RSA key fingerprint from connected computer)
  • Allow OEM unlocking
  • Have Android SDK installed on computer

Build

  • Clone kali-nethunter repository
  • Pull a Python Docker image python:2.7.14-jessie (even my local fresh macOS has problem of building)
  • Run Python Docker container: docker run -it -v [your-cloned-kali-nethunter-repo]:/root/kali-nethunter python:2.7.14-jessie bash
  • Build: python /root/kali-nethunter/nethunter-installer/build.py -d flounder --nougat --rootfs full (you have to build the Nougat version on your own, because the latest official version is only for Marshmallow)
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 26, 2024 01:50
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active March 6, 2024 18:14
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@cristobal
cristobal / machine-diskutil.sh
Last active February 27, 2024 23:36
Machine Diskutil to mount/unmont external volumes inside docker machines running on Virtualbox
#!/usr/bin/env sh
# @see http://stackoverflow.com/questions/30040708/how-to-mount-local-volumes-in-docker-machine
# @see https://github.com/boot2docker/boot2docker/blob/master/doc/FAQ.md
################################################################################
# Dependency Section #
# #
################################################################################
check_deps() {
## Make sure commands are available
@orta
orta / _SQL.sql
Last active November 8, 2016 12:12
Top 300 Pods by Application Integrations
SELECT pods.name, stats_metrics.download_total, stats_metrics.download_week, stats_metrics.app_total, stats_metrics.app_week FROM stats_metrics JOIN pods ON stats_metrics.pod_id = pods.id ORDER BY app_total DESC LIMIT 300;