Skip to content

Instantly share code, notes, and snippets.

@highel
highel / pillow-simd-libjpeg-turbo.md
Created November 13, 2023 22:59 — forked from willprice/pillow-simd-libjpeg-turbo.md
Pillow-SIMD with libjpeg/turbo

sudo apt-get install gcc-multilib

# The following steps are based on
# https://docs.fast.ai/performance.html#installation

$ conda install -y -c conda-forge gxx_linux-64 
$ conda uninstall -y --force jpeg libtiff
$ conda install -y -c conda-forge libjpeg-turbo --no-deps
@highel
highel / remove_sms.py
Last active September 16, 2023 22:43 — forked from GWuk/zte_sms.py
Remove all SMS from ZTE MF283V modem. This modem has tendency to overflow after you cant view SMS in UI. Tested on Russian Tele 2 version.
import requests
import json
import base64
url = 'http://192.168.0.1/goform/goform_get_cmd_process?isTest=false&cmd=sms_data_total&page=0&data_per_page=500&mem_store=1&tags=10&order_by=order+by+id+desc'
s = requests.Session()
s.headers.update({'Host': '192.168.0.1'})
s.headers.update({'Referer': 'http://192.168.0.1/index.html'})
r = s.get(url)
@highel
highel / build.gradle
Created January 6, 2018 16:55 — forked from AntonKosov/build.gradle
android + gradle + idea + git + private keystore
// Tags:
// Version name: ignore leading non-digits and everything after the first underscore
// Version code: take digits after the first underscore
// e.g. tag xxx1.2.3.foo-bar_15_baz will yield versionName 1.2.3.foo-bar and versionCode 15
// Output filename:
// <project name>-<release|debug>-<version (from last tag)|"dev" (doesn't have tag)>[-NOTRELEASE (exist changes after last tag)]-<last short commit hash>[-dirty (exist changes)].apk
// Sample:
// myproject-debug-dev-094cf50.apk
// myproject-debug-0.1.0-094cf50.apk
@highel
highel / keycloak.sh
Created July 20, 2016 17:30 — forked from paoloantinori/keycloak.sh
Keycloak Admin API Rest Example
#!/bin/bash
export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin" \
-d 'password=admin' \
-d 'grant_type=password' \
-d 'client_id=admin-cli' | jq -r '.access_token')
curl -X GET 'http://localhost:8080/auth/admin/realms' \