Skip to content

Instantly share code, notes, and snippets.

@rebane2001
rebane2001 / plot_discord_predictions.py
Last active May 19, 2024 13:15
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
"""
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
To use, simply put this script in your activity/analytics/ folder of your Discord data dump and run it.
You may need to install matplotlib first:
pip install -U matplotlib
thrown together by rebane2001
@progzone122
progzone122 / clipboard.sh
Created May 19, 2024 13:11
Fixing the wps-office clipboard in Linux on Wayland
#!/bin/bash
while true; do
wl-paste | xclip -selection clipboard
xclip -selection clipboard -o | wl-copy
sleep 0.5
done
@tegansnyder
tegansnyder / Magento 2 Programmatically Ship an Order with Tracking Details outside of Magento.md
Created March 29, 2021 04:39
Magento 2 Programmatically Ship an Order with Tracking Details outside of Magento

Create a file called abstract.php and place it in your root Magento folder:

abstract.php
<?php
use \Magento\Framework\AppInterface as AppInterface;
use \Magento\Framework\App\Http as Http;

use Magento\Framework\ObjectManager\ConfigLoaderInterface;
use Magento\Framework\App\Request\Http as RequestHttp;
@dhh
dhh / linux-setup.sh
Last active May 19, 2024 13:00
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl btop \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@nstarke
nstarke / release-android-debuggable.md
Last active May 19, 2024 12:58
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@avoidik
avoidik / README.md
Last active May 19, 2024 12:58
Repack APK, make it debuggable
@vaban-ru
vaban-ru / awesomeMask.js
Last active May 19, 2024 12:56
Универсальная маска для России с помощью iMask.js
// ДЕМО: https://codepen.io/vtboren/pen/ZdGRXp
// Подключаем скрипт маски https://unmanner.github.io/imaskjs/
// Функция маски
// Работает сразу на все поля с типом поля tel
function initPhoneMask() {
$('input[type=tel]').each(function(index, element) {
var mask = IMask(element, {
mask: [
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
function copyFolderSync(source, destination, excludeDirs) {
if (!fs.existsSync(destination)) {
fs.mkdirSync(destination, { recursive: true });
}
const items = fs.readdirSync(source, { withFileTypes: true });