Skip to content

Instantly share code, notes, and snippets.

View mer30hamid's full-sized avatar

Hamid Kord mer30hamid

View GitHub Profile
@mer30hamid
mer30hamid / gist:990734fc8ccdc29226030cf7bff7fe5d
Created June 12, 2023 14:54
Better twitter for "via browser"
[Adblock Plus 2.0]
! Checksum: dLH/Bj667/XR4lu/jvPj2w
!--------------------------------------------------------------------------
! Title : Better twitter for via
! Expires: 40 days
! Version: 182
! Download: https://google.com/
! Homepage: https://google.com/
! Support: https://google.com/
! License: MIT
@mer30hamid
mer30hamid / uBlock.txt
Last active June 5, 2023 16:26
Disable "Discover more / More Tweets" - Conversation view suggestions on Twitter.com using uBlock Origin حذف کاوش بیشتر در توییتر
! Read more here: https://www.reddit.com/r/uBlockOrigin/wiki/solutions/twitter/#wiki_others
! Chrome Extension: https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm
! Discover more / More Tweets - Conversation view suggestions
twitter.com##[aria-label="Timeline: Conversation"] [data-testid="cellInnerDiv"] h2:has-text(/^(Discover more|More Tweets)$/):upward([data-testid="cellInnerDiv"])
twitter.com##[aria-label="Timeline: Conversation"] [data-testid="cellInnerDiv"] h2:has-text(/^(Discover more|More Tweets)$/):upward([data-testid="cellInnerDiv"])~div
twitter.com##[aria-label="خط زمان: گفتگو"] [data-testid="cellInnerDiv"] h2:has-text(/^(کاوش بیشتر)$/):upward([data-testid="cellInnerDiv"])
twitter.com##[aria-label="خط زمان: گفتگو"] [data-testid="cellInnerDiv"] h2:has-text(/^(کاوش بیشتر)$/):upward([data-testid="cellInnerDiv"])~div
@mer30hamid
mer30hamid / config.json
Created April 21, 2023 07:36
XRAY config + load balancer + warp + block iranian hosts - you can add outbounds that have tag that begins with "proxy" (eg "proxy1", "proxy2" ...) then all requests to paths that ends with /loadbalance will go through them.
{
"log" : {
"access" : "XRAY_ACCESS_LOGPATH",
"error" : "XRAY_ERROR_LOGPATH",
"loglevel" : "XRAY_LOG_LEVEL"
},
"dns" : {
"servers" : [ "https+local://8.8.8.8/dns-query" ]
},
"inbounds" : [
@mer30hamid
mer30hamid / twitter block button click.user.js
Last active September 25, 2022 05:45
Tampermonkey script to Automatically clicking "block" button when opening "Likers Blocker" extension block page
// ==UserScript==
// @name twitter block button click
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically clicks "block" button when opening "Likers Blocker" extension block page
// @author You
// @match https://ichbinhier-twittertools.herokuapp.com/blocklists*
// @icon data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAATABMDAREAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAACAYFB//EACoQAAIBBAEDAgUFAAAAAAAAAAECAwQFBgcRABIhEzEUFRYyQRdRYXKB/8QAGQEAAgMBAAAAAAAAAAAAAAAABQYBAgQH/8QAKxEAAgAEBQMCBwEAAAAAAAAAAQIDBAURAAYSITEHQWFxgRMUFTJRUsEi/9oADAMBAAIRAxEAPwBabr35ef1A+gLFf6zGsZttV8Dfb/b4Ip641JhEphp0k5AVA0YeQKzAuAB4876dSZyruySi3C8kkDngb98MM9V8r9PaRCq2ZTrmJgEwIJDkFVbSXfRvbmwJAPknbHvWyV1xX0tdrLfN/wA1qDGk89jyFRV09ahHPpJVLGrU05H2g8ju4VgOtbZYqiQXmDDsFvcEi+3Nh3/vbAuS6rZHzDPwaNU
@mer30hamid
mer30hamid / moodle-ical-corrector.php
Last active August 29, 2015 14:16
This simple script, corrects moodle iCal utf-8 characters , if you are not Admin and not able to access and correct it on server ! see more here: https://tracker.moodle.org/browse/MDL-30756 how to use: replace $url value to the buggy iCal url, place this file in a self hosting site (your own site) for example: www.yoursite.com/moodle-ical-correc…
<?php
setlocale(LC_ALL, 'fa_IR'); //set your locale https://gist.github.com/jacobbubu/1836273
header('Content-type: text/calendar; charset=utf-8');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
$url = "http://moodle/buggy/ical/url"; //link to moodles iCal
$badstr = file_get_contents($url);
echo iconv("utf-8", "utf-8//ignore", $badstr);
?>
#include <nana/gui/wvl.hpp>
#include <nana/threads/pool.hpp>
void foo()
{
//This function will be “called” in other
//thread that is created by thread pool.
}
int main()
@mer30hamid
mer30hamid / Nana-int-04.cpp
Created June 22, 2014 19:44
use lambda, a new feature of C++11, for event answering
fm.make_event<events::click>([]{
//When the form is clicked, the object created
//by this lambda will be “called”.
});
//or
fm.make_event<events::click>([](const eventinfo& ei){
//When the form is clicked, the object created
//by this lambda will be “called”, and I can
@mer30hamid
mer30hamid / Nana-int-03.cpp
Last active August 29, 2015 14:02
we don’t need to care about the parameter of clicked() function
void clicked() //NO parameter defined.
{
//When the form is clicked,
//this function will be “called”.
}
@mer30hamid
mer30hamid / Nana-int-02.cpp
Created June 22, 2014 19:36
For example, answering an event
#include <nana/gui/wvl.hpp>
#include <nana/gui/widgets/button.hpp>
void clicked(const nana::gui::eventinfo&)
{
//When the window corresponds to fm is clicked,
//this function will be “called”.
}
int main()
@mer30hamid
mer30hamid / Nana-int-01.cpp
Last active August 29, 2015 14:02
How easy to create a Hello World program with Nana?
#include <nana/gui/wvl.hpp>
#include <nana/gui/widgets/label.hpp>
int main()
{
using namespace nana::gui;
form fm;
label lb(fm, fm.size());
lb.caption(L"Hello, World");
fm.show();