Skip to content

Instantly share code, notes, and snippets.

View itsamirhn's full-sized avatar
🦉
Work & Study

Amir Hosseini itsamirhn

🦉
Work & Study
  • Divar
  • Tehran - IRAN
View GitHub Profile
@Osb0rn3
Osb0rn3 / gamee.js
Created September 12, 2023 22:30
JavaScript code for generating checksum for Gamee
// Include the crypto-js library dynamically
var script = document.createElement('script');
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js';
script.onload = function () {
// The script has loaded, now you can use CryptoJS
function extractGameId() {
// Replace this with your actual logic to extract the game ID from the DOM
const iframe = document.querySelector('iframe[src*="game-"]');
if (iframe) {
@SamadiPour
SamadiPour / main.js
Last active April 2, 2025 08:46
ADSL TCI plan sorter
const planCards = document.querySelectorAll('#service-list .uk-card');
const cardDetails = [];
function convertPersianNumbersToEnglish(text) {
return text.replace(/[۰-۹]/g, (char) => String.fromCharCode(char.charCodeAt(0) - '۰'.charCodeAt(0) + '0'.charCodeAt(0)));
}
planCards.forEach(card => {
const title = convertPersianNumbersToEnglish(card.querySelector('.uk-card-title').textContent.trim());
const description = convertPersianNumbersToEnglish(card.querySelector('.uk-card-body p').textContent.trim());
@mietzen
mietzen / macos-bitwarden-cli-with-touch-id.md
Last active April 12, 2025 00:54
How to use use Bitwarden CLI with macOS Touch ID

How to use Bitwarden CLI with macOS Touch ID

If you want to use Bitwarden CLI for ssh have a look at: How to use use Bitwarden CLI for SSH-Keys in macOS

Wirtten and tested on macOS Ventura

Configure Touch ID for the sudo command

To allow Touch ID on your Mac to authenticate you for sudo access instead of a password you need to do the following.

@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active April 16, 2025 09:38
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

پنل x-ui

پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور

mkdir x-ui && cd x-ui
docker run -itd --network=host \
    -v $PWD/db/:/etc/x-ui/ \
 -v $PWD/cert/:/root/cert/ \
@ArmanTaheriGhaleTaki
ArmanTaheriGhaleTaki / ffmpegautomate.cpp
Last active June 5, 2023 09:07
automation of the process of the naming the output file
#include <iostream>
#include <sys/stat.h>
#include <fstream>
void compress( char** input);
unsigned long long int fileSize(std::string fileNameWithextensionSTR);
void diffsize(std::string fileNameWithextensionSTR1,std::string fileNameWithextensionSTR2);
inline bool IsMP4FileExists (const std::string& name);
using namespace std;
int *argcGlobal=0;
int main(int argc, char **argv) {
@arastu
arastu / current_track.applescript
Last active November 27, 2020 19:52
update twitter bio and add current playing song from Spotify to it
on escape_quotes(string_to_escape)
set AppleScript's text item delimiters to the "\""
set the item_list to every text item of string_to_escape
set AppleScript's text item delimiters to the "\\\""
set string_to_escape to the item_list as string
set AppleScript's text item delimiters to ""
return string_to_escape
end escape_quotes
tell application "Spotify"
@Techbrunch
Techbrunch / magic.sh
Created April 3, 2020 18:50
Adding magic bytes at the beginning of a file
# The magic bytes for PNG
echo '89 50 4E 47 0D 0A 1A 0A' | xxd -p -r >> reverse.php.png
cat reverse.php >> reverse.php.png
@ihciah
ihciah / README.MD
Last active June 4, 2023 01:23
V2ray MTProto through Shadowsocks

V2ray MTProto through Shadowsocks

Why use it

The MTProto is easy to block; shadowsocks is hard to identify but cannot work without a client.

You can deylop this docker image to run a relay inside the firewall (China/Russia etc.), it provide a MTProto and all the packets will be sent through shadowsocks protocol.

How to run

@amosavian
amosavian / App-Bridging-Header.h
Last active February 11, 2019 16:10
Workaround OneSignal embargo
/// Add these lines to your app bridging header
#import <OneSignal/OneSignal.h>
#import "OneSignalTweak.h"
@dhaiducek
dhaiducek / gomatrix
Created April 20, 2018 14:12
Modified Matrix Effect (original from @khakimov)
#!/bin/bash
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
lines=$1
random_col=$3
letter=$4