Skip to content

Instantly share code, notes, and snippets.

View tinyx3k's full-sized avatar
💭
I may be slow to respond.

TiNyX3k tinyx3k

💭
I may be slow to respond.
View GitHub Profile
@tinyx3k
tinyx3k / gist:7301d0a82f6cc03c34d3013aa1299615
Created September 18, 2021 10:09 — forked from juliend2/gist:757422
Photoshop Javascript to increment text layer value and save for Web (in a loop)
function sfwPNG24(saveFile){
var pngOpts = new ExportOptionsSaveForWeb;
pngOpts.format = SaveDocumentType.PNG
pngOpts.PNG8 = false;
pngOpts.transparency = true;
pngOpts.interlaced = false;
pngOpts.quality = 100;
activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);
}
@tinyx3k
tinyx3k / app.py
Created February 14, 2022 09:03 — forked from tatiblockchain/app.py
Facebook Messenger API Python Code
from flask import Flask, request
import requests
import json
import config
app = Flask(__name__)
app.config['SECRET_KEY'] = 'enter-your-app-secret-key'
@tinyx3k
tinyx3k / download_gdrive
Created March 1, 2022 09:57 — forked from ankitmundada/download_gdrive
Shell Script to download Publicly shared Google drive files
#!/bin/bash
# Get files from Google Drive
# Source: https://stackoverflow.com/a/50573452/2382312
# Usage: download_gdrive FILE_ID DESTINATION_PATH
# $1 = file ID
# $2 = file name
URL="https://drive.google.com/uc?export=download&id=$1"
@tinyx3k
tinyx3k / automatic_invoice.gs
Created March 25, 2022 14:24 — forked from automagictv/automatic_invoice.gs
Apps Script code to automatically replace template variables in your invoice document.
///////////////////////////////////////////////////////////////////////////////////////////////
// BEGIN EDITS ////////////////////////////////////////////////////////////////////////////////
const TEMPLATE_FILE_ID = 'YOUR_TEMPLATE_FILE_ID_HERE';
const DESTINATION_FOLDER_ID = 'YOUR_DESTINATION_FOLDER_ID_HERE';
const CURRENCY_SIGN = '$';
// END EDITS //////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
// WARNING: EDITING ANYTHING BELOW THIS LINE WILL CHANGE THE BEHAVIOR OF THE SCRIPT. //////////
@tinyx3k
tinyx3k / download.js
Created April 2, 2022 12:15 — forked from thinhbuzz/download.js
Download all photos from facebook Page
(async () => {
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
function getPageId() {
const tags = Array.from(
document.body.querySelectorAll("script:not([src])")
);
@tinyx3k
tinyx3k / dump-pyc-with-gdb.md
Created April 19, 2022 10:33 — forked from stecman/dump-pyc-with-gdb.md
Dumping all bytecode from a packaged Python application

This is a technique for extracting all imported modules from a packaged Python application as .pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).

This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.

Theory

In Python we can leverage the fact that any module import involving a .py* file will eventually arrive as ready-to-execute Python code object at this function:

PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);
@tinyx3k
tinyx3k / Phpobf.php
Created April 19, 2022 14:37 — forked from Datez-Kun/Phpobf.php
Php obfuscator ,written by kakatoji
<?php
class PhpObf {
private array $names = array();
private string $nono = "\x1b[H\x1b[2J\x1b[3J";
private string $enctype = '';
@tinyx3k
tinyx3k / auto-remove-sublime-license-popup
Created June 7, 2022 13:09 — forked from egel/auto-remove-sublime-license-popup
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)
@tinyx3k
tinyx3k / rarreg.key
Created July 7, 2022 14:38 — forked from MuhammadSaim/rarreg.key
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
Windows Registry Editor Version 5.00
;-----------------------------------
; https://superuser.com/a/1284919/402626
;-----------------------------------
; REMOVE DEFAULT NEW CONTEXT MENU ITEMS
;-----------------------------------