Skip to content

Instantly share code, notes, and snippets.

@ttodua
ttodua / sample-ws-proxy
Last active September 20, 2023 18:30
sample WS (WebSockets) & PROXY
// ======================================================
// ================ SAMPLE SERVER =================
// ======================================================
const createServer = (require('http')).createServer;
const WebSocketServer = require('ws').WebSocketServer;
const server_host = '127.0.0.1';
const server_port = 4444;
const s = createServer((req, res) => {
@ttodua
ttodua / currencies-ids.txt
Created January 23, 2023 17:23
bitfinex-currency-networks-mappings-UNFINISHED
currencies
[
"1INCH",
"AAA",
"AAVE",
"AAVEF0",
"ADA",
"ADAF0",
"AIX",
@ttodua
ttodua / readme.md
Created June 9, 2022 12:03
Download all fonts from fonts.ge
<?php
// Choose target directory for downloaded files
$save_directory= './fonts_ge';
// You can set the starting page number, i.e. 44 ( https://fonts.ge/ka/fonts/?sort_by=name&pn=44 )
$start_page_num= !empty($_GET['startpage']) ? $_GET['startpage'] : 1;
// by 2019, this is url, if changes in future, change this..
$download_url = 'https://fonts.ge/ka/download/font/';
sign (path, api = 'private', method = 'GET', params = {}, headers = undefined, body = undefined) {
let request = '/' + this.version + '/' + this.implodeParams (path, params);
params = this.omit (params, this.extractParams (path));
if (method === 'GET' || method === 'DELETE') {
if (Object.keys (params).length) {
request += '?' + this.urlencode (params);
}
}
const url = this.urls['api'][api] + request;
@ttodua
ttodua / myPlugin.php
Last active March 15, 2022 19:34
example puvox-library based plugin
<?php
/*
* Plugin Name: My Example plugin
* Description: Somewhat plugin description here
* Text Domain: my-plugin-textdomain-slug
* Domain Path: /languages
* Version: 1.234
* WordPress URI: https://wordpress.org/plugins/this-plugin-name/
* Plugin URI: https://example.com/wordpress/this-plugin
* Contributors: wpOrgUsername
@ttodua
ttodua / .htaccess
Created June 1, 2021 11:06
WP & php 7.4 (zts) & docker
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
@ttodua
ttodua / depth_chart.html
Last active April 15, 2021 17:37 — forked from flavioespinoza/depth_chart.html
D3 Market Depth Chart built from Order Book
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>d3 depth chart</title>
<script type="text/javascript" src="https://d3js.org/d3.v4.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
<style>
javascript: use_DIRECT_COPY=true; function fallbackCopyTextToClipboard(text) { var textArea = document.createElement("textarea"); textArea.value = text; textArea.style.position="fixed"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand("copy"); } catch (err) { promptCopy1(text); } document.body.removeChild(textArea); } function promptCopy1(text){ prompt("url", text); }; (function(){ var yt=document.getElementById("movie_player"); var data=yt.getVideoData(); var text=data["title"] + " " + "https://youtu.be/"+data["video_id"]+"?t="+Math.floor(yt.getCurrentTime()); if (use_DIRECT_COPY) fallbackCopyTextToClipboard(text); else {promptCopy1(text);} })(); void(0);
@ttodua
ttodua / PEiD "userdb.txt" full
Last active March 14, 2023 07:13
PEiD "userdb.txt" full (3 compilaction merged)
; 3 DBs together:
; https://handlers.sans.org/jclausing/userdb.txt
; https://web.archive.org/web/20160611182612/https://reverse-engineering-scripts.googlecode.com/files/UserDB.TXT
; https://web.archive.org/web/20140924084024/http://research.pandasecurity.com/blogs/images/userdb.txt
; current page: https://gist.github.com/ttodua/a7876b9aed1e93890b3c7aaebddc9f4e
[!EP (ExE Pack) V1.0 -> Elite Coding Group]
signature = 60 68 ?? ?? ?? ?? B8 ?? ?? ?? ?? FF 10
ep_only = true
NEED to CHANGE :
_________1_____________
require_once( 'Facebook/FacebookHttpable.php' );
to
require_once( 'Facebook/HttpClients/FacebookHttpable.php' );
_________2_____________
use Facebook\FacebookHttpable;
to