Skip to content

Instantly share code, notes, and snippets.

View hugmouse's full-sized avatar
🏳️‍🌈
<- a rainbow flag wow

Mysh! hugmouse

🏳️‍🌈
<- a rainbow flag wow
View GitHub Profile
@hugmouse
hugmouse / bash.php
Last active April 24, 2019 07:03
Простой пример работы с Simple Html Dom - переход по ссылкам, найденым на изначальной странице
<?php
include "./simple_html_dom.php";
// Создаем дом
$html = file_get_html('https://bash.im');
// Находим ссылки
foreach($html->find('a[class=quote__header_permalink]') as $a) {
// Находим ссылки и берем у них аттрибут "Href", он бывает относительный и поэтому...
$url = $a->href;
// ...я добавляю "https://bash.im" здесь, так как на этом сайте все ссылки - относительные.
@hugmouse
hugmouse / replace-ubuntu-archive-mirror.sh
Created October 30, 2019 04:32
Replaces "archive.ubuntu.com" with "mirror.yandex.ru"
sudo sed -i 's/archive.ubuntu.com/mirror.yandex.ru/g' /etc/apt/sources.list
@hugmouse
hugmouse / easyDBCopy.go
Created December 9, 2019 14:36
Easy way to copy one EasyDB to another EasyDB
package easyDBCopy
import (
easy "github.com/EasyDB-io/Golang/client"
)
type DB struct {
database string
token string
}
@hugmouse
hugmouse / fizzbuzz.go
Created February 12, 2020 15:32
FizzBuzz task, but the input of which is a number that is larger than the machine word (https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic)
package main
import (
"fmt"
"math/big"
)
func FizzBuzz(n string) string {
var i, x, one, zero, fizz, buzz, result big.Int
@hugmouse
hugmouse / ublock_vas3k.club_removeSponsor
Created July 14, 2020 06:50
[uBlock] Фильтр для vas3k.club, который убирает спонсорский пост
! 7/14/2020 https://vas3k.club
vas3k.club##div.block:has(img[alt="💰"])
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreieahs3e4vtmnlz7ig7xebrqggcoci5gky4tnvb6x25puahgat2jaq ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreieahs3e4vtmnlz7ig7xebrqggcoci5gky4tnvb6x25puahgat2jaq ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@hugmouse
hugmouse / yandex_filter.txt
Last active January 21, 2021 09:34
Yandex.ru Debloater (uBlock cosmetic filter)
! 2021-01-21 https://yandex.ru
yandex.ru##div.col.footer[role="complementary"] > div > div > div:nth-child(1)
yandex.ru##.desk-notif-card:nth-child(4)
yandex.ru##div.col.col_td_0.widgets__col.widgets__col_td_1
yandex.ru##div.desk-notif > div:nth-child(2)
yandex.ru##.services-new
yandex.ru##.home-link_intense-blue_yes.home-link
! 2021-01-21 https://mail.yandex.ru
mail.yandex.ru##.mail-Layout-Content > div:nth-child(4)
@hugmouse
hugmouse / twitch_filter.txt
Created January 21, 2021 09:27
Twitch.tv Debloater
! 2021-01-20 https://www.twitch.tv
www.twitch.tv##.side-nav-exp--hold-width
www.twitch.tv##.top-nav__prime.tw-align-self-center.tw-flex-grow-0.tw-flex-nowrap.tw-flex-shrink-0.tw-mg-x-05
www.twitch.tv##div[class="tw-align-self-center tw-flex-grow-0 tw-flex-nowrap tw-flex-shrink-0 tw-mg-x-05"] > div > div > div > button
@hugmouse
hugmouse / main.go
Created July 9, 2021 06:17
GoCV + screen capture attempt
package main
import (
"github.com/jezek/xgb"
"github.com/jezek/xgb/xproto"
"gocv.io/x/gocv"
"image"
"log"
"time"
)