Skip to content

Instantly share code, notes, and snippets.

@saeidzebardast
saeidzebardast / youtube-dl-playlist
Last active April 29, 2022 16:12
Download Youtube playlist in a folder and indexing videos using youtube-dl
alias youtube-dl-playlist="youtube-dl --ignore-errors --output '%(playlist)s/%(playlist_index)s- %(title)s.%(ext)s'"
@IISResetMe
IISResetMe / Get-MachineSID.ps1
Created December 30, 2014 15:40
PsGetSid local machine SID implementation in PowerShell
function Get-MachineSID
{
param(
[switch]
$DomainSID
)
# Retrieve the Win32_ComputerSystem class and determine if machine is a Domain Controller
$WmiComputerSystem = Get-WmiObject -Class Win32_ComputerSystem
$IsDomainController = $WmiComputerSystem.DomainRole -ge 4
@techthoughts2
techthoughts2 / Send-TelegramTextMessage
Last active June 9, 2023 14:37
This PowerShell function will send a Telegram message via the Telegram Bot API. Specify your Bot token and chat ID and send text messages to the specified Telegram chat via PowerShell.
<#
.Synopsis
Sends Telegram text message via Bot API
.DESCRIPTION
Uses Telegram Bot API to send text message to specified Telegram chat. Several options can be specified to adjust message parameters.
.EXAMPLE
$bot = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"
$chat = "-#########"
Send-TelegramTextMessage -BotToken $bot -ChatID $chat -Message "Hello"
.EXAMPLE
#!/usr/bin/php
<?php
/* Transmission to Deluge export script
*
* Transmission - transmission-gtk 2.77 (14031)
* Deluge - deluge: 1.3.6
* Script - PHP 5.4.14 (cli)
*
* How to use this script;
* 1) Run `php trans_to_deluge.php` and make sure there aren't any errors.
@digitalhitler
digitalhitler / smali-cheatsheet.txt
Created September 4, 2018 21:20
Smali docs на русском
Небольшая помощь в Smali
(Будет дополняться)
#
Общая информация
#
Smali
Виды(Types)
Байт-код Dalvik имеет два основных класса типов, примитивные типы и ссылочные типы. Типы ссылок - это объекты и массивы, все остальное является примитивным.
@shamil
shamil / mount_qcow2.md
Last active March 26, 2024 14:47
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8