Skip to content

Instantly share code, notes, and snippets.

@nathanielevan
nathanielevan / vert-center-glyphs.py
Created March 25, 2023 01:37
Python script to vertically center glyphs in a font
# Python script to vertically center a set of glyphs in a font.
# Requires fontforge python module.
# Credits to u/janKeTami here: https://www.reddit.com/r/FontForge/comments/11r6x4q/vertically_centering_glyphs/
# Slightly altered to enable this script to be run straight from the terminal using ttf/otf fonts
import re
import os
import argparse
try:
import psMat
@vikassaini01
vikassaini01 / kms
Last active April 16, 2024 12:51 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
Online kms host address:
--------
kms.digiboy.ir
54.223.212.31
kms.cnlic.com
kms.chinancce.com
kms.ddns.net
franklv.ddns.net
k.zpale.com
m.zpale.com
@unoexperto
unoexperto / patch_apk_for_sniffing.md
Last active March 28, 2024 08:49
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d net.flixster.android-9.1.3@APK4Fun.com.apk
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@Neo-Oli
Neo-Oli / .tmux.conf
Last active April 15, 2024 18:34
Tmux settings for termux
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Resize panes with arrow keys because alt-arrow keys doesn't work
bind-key -r Up resize-pane -U
bind-key -r Down resize-pane -D
bind-key -r Left resize-pane -L
bind-key -r Right resize-pane -R

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
@andersevenrud
andersevenrud / bl-fullscreen-server-browser.user.js
Last active November 30, 2020 01:44
Fullscreen Battlelog Server Browser (BF4)
// ==UserScript==
// @name Fullscreen Battlelog Server Browser (BF4)
// @namespace http://andersevenrud.github.io/
// @version 0.5.0
// @description Fullscreen Battlelog Server Browser (BF4)
// @match http://battlelog.battlefield.com/bf4
// @match http://battlelog.battlefield.com/bf4/*
// @match http://cte.battlelog.battlefield.com/bf4
// @match http://cte.battlelog.battlefield.com/bf4/*
// @match http://cte.battlelog.com/bf4
@jkjustjoshing
jkjustjoshing / $inject.user.js
Last active December 6, 2021 16:32
Angular $inject userscript.
// ==UserScript==
// @name AngularJS Injector
// @namespace http://joshkra.me/
// @version 0.1
// @description Binds $inject method to window
// @author jkjustjoshing
// @match *://*/*
// ==/UserScript==
// This userscript creates an $inject() method on the window object that can be used to
@HakShak
HakShak / BlendColor.lua
Last active August 29, 2015 14:16
Rainmeter LUA Script for blending multiple color scales
-- BlendColor is a LUA script for processing multiple color scales to output
-- RGBA notation within Rainmeter INIs.
--Each scale is composed of "Start Percentrage, End Percentage, Start Color Value, End Color Value" notation
--e.g.: Fade a color in gradually over 100% would be "0,100,0,255"
--You can add more scales via a pipe '|' delimiter
--The below examples are the equivalent of "0,100,0,255"
--"0,50,0,128|50,100,128,255"
--"0,25,0,64|25,50,64,128|75,50,128,192|75,100,192,255"
@chrisjhoughton
chrisjhoughton / wait-el.js
Last active October 6, 2023 09:46
Wait for an element to exist on the page with jQuery
var waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}
};