Skip to content

Instantly share code, notes, and snippets.

@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 });
@tannerlinsley
tannerlinsley / useGlobalMemo.js
Created August 28, 2020 23:45
useGlobalMemo is a React hook that lets you share memoizations across an entire app using a unique key.
const cache = {}
export default function useGlobalMemo (key, fn, deps) {
if (!cache[key]) {
cache[key] = {
subs: 0,
deps,
value: fn(),
}
@devinschumacher
devinschumacher / cloud-gpus.md
Last active May 19, 2024 12:50
Cloud GPUs // The Best Servers, Services & Providers [RANKED!]

Cloud GPUs: Servers, Providers & Everything You Would Ever Need

Your company's GPU computing strategy is essential whether you engage in 3D visualization, machine learning, AI, or any other form of intensive computing.

There was a time when businesses had to wait for long periods of time while deep learning models were being trained and processed. Because it was time-consuming, costly, and created space and organization problems, it reduced their output.

This problem has been resolved in the most recent GPU designs. Because of their high parallel processing efficiency, they are well-suited for handling large calculations and speeding up the training of your AI models.

When it comes to deep learning, GPUs can speed up the training of neural networks by a factor of 250 compared to CPUs, and the latest generation of cloud GPUs is reshaping data science and other emerging technologies by delivering even greater performance at a lower cost and with the added benefits of easy scalability and rapid deployment.

@HarmJ0y
HarmJ0y / PowerView-3.0-tricks.ps1
Last active May 19, 2024 12:47
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
#include <BleGamepad.h>
BleGamepad bleGamepad;
int btn_last = 0;
int btn_pin = 4;
int poti_pin = 34;
int con = 0;
void setup()
{