Skip to content

Instantly share code, notes, and snippets.

View Far-Se's full-sized avatar
🦝

Far Se Far-Se

🦝
  • Iasi
View GitHub Profile
View DarkMatter.theme.css
/**
* @name Dark Matter
* @author Tropical#8908, Hammock#3110
* @version 3.0.0
* @description A cold, dark & frosty theme.
* @source https://github.com/DiscordStyles/DarkMatter/
*/
@import url('https://DiscordStyles.github.io/DarkMatter/src/base.css');
@Far-Se
Far-Se / discord.script.js
Created October 30, 2023 14:33
Tampermonkey script to block certain websites based on time
View discord.script.js
// ==UserScript==
// @name BlockWebsite
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://discord.com/*
// @icon https://icons.duckduckgo.com/ip2/iconfinder.com
// @grant none
// @run-at document-start
@Far-Se
Far-Se / discord.js
Last active August 1, 2023 14:40
Discord mimic user name and avatar.
View discord.js
// ==UserScript==
// @name Discord Mimic
// @namespace Discord
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://discord.com/*
// @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
View object_search.js
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
console.log('SEARCHING...')
console.log('-----------------------------------------------------------')
globalSearch(window, 'prØØf')
console.log('>>> D O N E >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
function globalSearch(startObject, value, returnFirstResult = false) {
var stack = [[startObject, '']]
View discord_src.js
// ==UserScript==
// @name Discord Copy SRC ALT+C
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://discord.com/*
// @icon https://icons.duckduckgo.com/ip2/discord.com.ico
// @grant none
// ==/UserScript==
@Far-Se
Far-Se / flutter_sign.bat
Last active August 14, 2022 04:56
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 / winIconsPowerShell.dart
Created July 17, 2022 06:31
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;
@Far-Se
Far-Se / icontopng.cpp
Last active July 19, 2022 06:17
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());
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");