Skip to content

Instantly share code, notes, and snippets.

Avatar
🦝

Far Se Far-Se

🦝
  • Iasi
View GitHub Profile
@Far-Se
Far-Se / yt-remove-liked-videos-v2.js
Last active Oct 16, 2022
Youtube delete all liked videos. Hover your mouse on the 3 dots then hit F4. If video is deleted, go with the mouse to the next one. Install AutoHotKey first.
View yt-remove-liked-videos-v2.js
//Open DevTools and paste this in Console.
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function deleteLikedVideos() {
'use strict';
var items = document.querySelectorAll('ytd-menu-renderer > yt-icon-button.dropdown-trigger > button[aria-label]');
var out;
@Far-Se
Far-Se / discord-avatar.js
Created Jan 26, 2022
Discord Tampermonkey script to change avatar and status automatically, at each hour.
View discord-avatar.js
// ==UserScript==
// @name Discord Avatar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://discord.com/channels/*
// @icon https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://discord.com
// @grant GM_xmlhttpRequest
// @grant GM.setValue
@Far-Se
Far-Se / google-play.js
Last active Aug 18, 2022
Google Play See Maximum Installs and Release Date.
View google-play.js
// ==UserScript==
// @name Google PlayStore Info
// @namespace http://tampermonkey.net/
// @version 9.1.2
// @description try to take over the world!
// @author You
// @match https://play.google.com/store/*
// @icon https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://play.google.com
// @grant none
// ==/UserScript==
@Far-Se
Far-Se / flutter_sign.bat
Last active Aug 14, 2022
Flutter desktop sign executable
View flutter_sign.bat
:: paste one by one, you will receive questions for each.
openssl genrsa -out appname.key 2048
openssl req -new -key appname.key -out appname.csr
openssl x509 -in appname.csr -out appname.crt -req -signkey appname.key -days 365
openssl pkcs12 -export -out CERTIFICATE.pfx -inkey appname.key -in appname.crt
signtool sign /f "path\to\CERTIFICATE.pfx" /p "password" /t http://timestamp.digicert.com /fd SHA256 "path\to\executable.exe"
@Far-Se
Far-Se / yt-sidebar.js
Last active Jul 20, 2022
Youtube new Sidebar, cleaner and playlists separated from Youtube generated lists.
View yt-sidebar.js
// ==UserScript==
// @name Youtube New Sidebar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Youtube new Sidebar, cleaner and playlists separated from Youtube generated lists.
// @author Your Grandma
// @match https://www.youtube.com/*
// @icon https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://youtube.com
// @grant none
// ==/UserScript==
@Far-Se
Far-Se / icontopng.cpp
Last active Jul 19, 2022
Winapi Convert icon to png with transparency. Extract hicon from dll and store it as uint8 including hbmColor and hbmMask
View icontopng.cpp
#include <Windows.h>
#include <shellapi.h>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
HICON getIconFromFile(wstring file, int index = 0)
{
HICON hIcon;
LPWSTR filePath = const_cast<LPTSTR>(file.c_str());
@Far-Se
Far-Se / winIconsPowerShell.dart
Created Jul 17, 2022
Extract Icons using PowerShell
View winIconsPowerShell.dart
class Globals {
static String iconCachePath = "${Directory.current.path}\\cache";
}
class WinUtils {
static Future<List<String>> runPowerShell(List<String> commands) async {
final io.ProcessResult result = await io.Process.run(
'powershell',
<String>['-NoProfile', ...commands],
);
View extracticondart.cpp
else if (method_name.compare("iconToBytes") == 0)
{
const flutter::EncodableMap &args = std::get<flutter::EncodableMap>(*method_call.arguments());
std::string iconLocation = std::get<std::string>(args.at(flutter::EncodableValue("iconLocation")));
int iconID = std::get<int>(args.at(flutter::EncodableValue("iconID")));
std::wstring iconLocationW = Encoding::Utf8ToWide(iconLocation);
HICON icon = getIconFromFile((LPWSTR)iconLocationW.c_str(), iconID);
std::vector<CHAR> buff;
View getWindowIcon.dart
static Uint8List getWindowIcon(hWnd, {background = 0xffffff, hover = false}) {
var icon = SendMessage(hWnd, WM_GETICON, 2, 0); // ICON_SMALL2 - User Made Apps
if (icon == 0) icon = GetClassLongPtr(hWnd, -14); // GCLP_HICON - Microsoft Win Apps
//final xIcon = icon;
final piconinfo = calloc<ICONINFO>();
GetIconInfo(icon, piconinfo);
final hICON = calloc<BITMAP>();
View taskbar.cpp
#include <Windows.h>
#include <stdio.h>
#include <iostream>
void SetTransparent(HWND target_window, bool type)
{
DWORD exstyle;
typedef BOOL(WINAPI* MySetLayeredWindowAttributesType)(HWND, COLORREF, BYTE, DWORD);
static MySetLayeredWindowAttributesType MySetLayeredWindowAttributes = (MySetLayeredWindowAttributesType)
GetProcAddress(GetModuleHandle(L"user32"), "SetLayeredWindowAttributes");