Skip to content

Instantly share code, notes, and snippets.

@yosignals
yosignals / Folding.py
Created April 15, 2024 14:09
Hiding Files in Folders ... names
import os
import argparse
import hashlib
def file_to_hex(filename):
"""Convert file content to a hex string."""
with open(filename, 'rb') as file:
content = file.read()
return content.hex(), content
@TameemS
TameemS / debloatNox.md
Last active April 16, 2024 13:55 — forked from Log1x/debloatNox.md
Debloating & Optimizing Nox (Updated)

More of my guides: Debloating MEMu - Debloating LDPlayer

Log1x's guide is pretty outdated, so I have made an updated version

Debloating Nox (Updated)

Nox, despite being the most feature-filled Android emulator, has a lot of negativity surrounding it due to their antics when it comes to making income off of their program. It is known for running repeated advertisments in the background, calling home and passing along system information (outside of your Android instance) as well as a vast amount of potentially sensitive data in an encrypted payload back to their multitude of servers. With the following preventitive measures, we can stop a majority of this happening as well as greatly improve the overall performance.

This guide is mainly targeted at Android 12. It may work on Android 5, 7 and 9 inst

@MetalArend
MetalArend / swarm.yml
Last active April 16, 2024 13:54
Run a GitLab Runner on your Swarm
version: '3.4'
secrets:
# Find your registration token at: "Your project" > "Settings" > "CI/CD" > "Runners settings" > "Specific Runners" (look for registration token)
# Register it as `GITLAB_REGISTRATION_TOKEN`: `docker secret create GITLAB_REGISTRATION_TOKEN YOUR_REGISTRATION_TOKEN`
GITLAB_REGISTRATION_TOKEN:
external: true
# Find your personal access token at: "Your user account" > "Settings" > "Access Tokens" > "Create personal access token" (for api)
# Register it as `GITLAB_PERSONAL_ACCESS_TOKEN`: `docker secret create GITLAB_PERSONAL_ACCESS_TOKEN <YOUR ACCESS TOKEN>`
@jpkrohling
jpkrohling / tracing.js
Created August 8, 2022 20:04
Using OTLP gRPC for nodejs with Grafana Cloud Traces
/* tracing.js */
const grpc = require('@grpc/grpc-js');
// Require dependencies
const opentelemetry = require("@opentelemetry/sdk-node");
const { getNodeAutoInstrumentations } = require("@opentelemetry/auto-instrumentations-node");
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-grpc');
const metadata = new grpc.Metadata();
// after "Basic", comes the output of:
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 16, 2024 13:54
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 16, 2024 13:54 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@surajsau
surajsau / ParallaxScreen.kt
Last active April 16, 2024 13:53
Parallax effect with Jetpack Compose
@Composable
fun ParallaxScreen(modifier: Modifier = Modifier) {
val context = LocalContext.current
val scope = rememberCoroutineScope()
var data by remember { mutableStateOf<SensorData?>(null) }
DisposableEffect(Unit) {
val dataManager = SensorDataManager(context)
dataManager.init()
@fitzgeraldsteele
fitzgeraldsteele / net-promoter-score.py
Created November 7, 2013 21:13
A little python function to calculate the net promoter score from a list of ratings. Also wanted to practice doctests.
#!/usr/bin/env python
import sys
def netpromoterscore(scores):
"""
Calculates the netpromoter score of a list
The Net Promoter Score is obtained by asking customers a single question on a 0 to 10 rating scale:
'How likely is it that you would recommend our company to a friend or colleague?'
Based on their responses, customers are categorized into one of three groups:
Promoters (9-10 rating), Passives (7-8 rating), and Detractors (0-6 rating).
@iambryancs
iambryancs / pyenv-wsl-ubuntu_22.04.md
Created May 31, 2023 10:31
Using Pyenv in WSL Ubuntu 22.04 LTS to install Python 3.8

Using Pyenv in WSL Ubuntu 22.04 LTS to install Python 3.8

Env

  • Windows 10
  • Ubuntu 22.04 WSL
  • zsh

Requirements

  • git
@echo off
DISM > nul 2>&1 || echo error: administrator privileges required >&2 && exit /b 1
where xperf.exe > nul 2>&1
if not %errorlevel% == 0 (
echo error: xperf not found in path. install "Windows Performance Toolkit" in the ADK from the link below >&2
echo https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install
exit /b 1
)