Skip to content

Instantly share code, notes, and snippets.

@CFM880
CFM880 / aosp.patch
Last active September 11, 2023 05:52
AOSP检测隐私政策patch
project frameworks/base/
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index db5dcc5c264b..404db6dfaf64 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -741,6 +741,7 @@ public class Activity extends ContextThemeWrapper
OnCreateContextMenuListener, ComponentCallbacks2,
Window.OnWindowDismissedCallback,
AutofillManager.AutofillClient, ContentCaptureManager.ContentCaptureClient {
@tuxity
tuxity / navicat_premium_reset_trial.sh
Last active May 22, 2024 06:17
Reset Navicat Premium 15/16/17 remaining trial days
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
@wshayes
wshayes / example.py
Created June 8, 2019 22:17
[FastAPI Websocket Example #2] #fastapi
# https://github.com/tiangolo/fastapi/issues/258#issuecomment-495975801
from typing import List
from fastapi import FastAPI
from starlette.responses import HTMLResponse
from starlette.websockets import WebSocket, WebSocketDisconnect
app = FastAPI()
@elevenchars
elevenchars / fridanotes.md
Last active May 19, 2024 05:41
My notes on injecting a frida gadget into an apk
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
@koenrh
koenrh / gcp-gpu-vm-hashcat.md
Last active February 4, 2024 18:37
Running Hashcat on Google Cloud's new GPU-based VMs

Running Hashcat on Google Cloud's GPU-based VMs

In February 2017, Google announced the availability GPU-based VMs. I spun up a few of these instances, and ran some benchmarks. Along the way, I wrote down the steps taken to provision these VM instances, and install relevant drivers.

Update April 2019: Updated instructions to use instances with the Tesla T4 GPUs.

@chilts
chilts / alexa.js
Created October 30, 2013 09:27
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip')
.pipe(unzip.Parse())
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
})
;