Skip to content

Instantly share code, notes, and snippets.

View antonydevanchi's full-sized avatar
💭
I may be slow to respond.

Anton Piskunov antonydevanchi

💭
I may be slow to respond.
View GitHub Profile
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
stun.fwdnet.net
@antonydevanchi
antonydevanchi / README.md
Last active December 8, 2020 10:05
com.apple.HIToolbox.plist для раскладки Бирмана

Just copy and run

curl -s -L https://cdn.psknv.ru/code/fix-layout.sh | bash

or

curl -s -L https://gist.githubusercontent.com/antonydevanchi/8cbaf786593067a5c88ebe3db3b6ad2f/raw/39b3a834688ede991dde31bf2c2e107fab3afb01/fix-layout.sh | bash

@antonydevanchi
antonydevanchi / crushimg.sh
Created November 26, 2020 12:37 — forked from caiguanhao/crushimg.sh
Recursively crush/shrink/optimize/losslessly compress PNGs, JPEGs and GIFs.
#!/bin/bash
# This is an improved script of pngfix.sh (https://gist.github.com/404909)
# which can also crush/shrink/optimize/losslessly compress JPEGs and GIFs.
# It is recommended you backup your image files before executing this script.
# Operation will be skipped if output file is bigger in size.
#
# use chmod +x crushimg.sh to make it executable and then ./crushimg.sh to run, or
# bash ./crushimg.sh to run it directly
#
# ./crushimg.sh [FILE] - (default to current directory)
@antonydevanchi
antonydevanchi / pagespeed_optimize_images.sh
Created November 26, 2020 12:34 — forked from julianxhokaxhiu/pagespeed_optimize_images.sh
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;
@antonydevanchi
antonydevanchi / 00-extract-PNG-to-files.sh
Last active November 14, 2020 14:46
How to parse raw .mobileconfig with web clips and extract base64 encoded PNG icons from payload. Нахуя и зачем — не спрашивайте. Просто... Примите и отпустите.
strings ~/Downloads/profile_dfcab51cf5cccfd991b9065745bf71c4_signed.mobileconfig | grep -E '<plist/>|<plist.*><' | xmlstarlet sel -t -m /plist/dict/array/dict -v data -n | xargs -n1 bash -c 'echo "$@" | base64 -d > ~/Downloads/`date +%s`_`openssl rand -base64 32 | md5`.png' --
@antonydevanchi
antonydevanchi / search_templates
Last active August 9, 2021 15:25 — forked from bobpoekert/search_templates
A machine readable list of search engines. Each line is a query template, where all occurrences of {searchTerms} should be replaced with the search query.These were scraped off mycroft.mozdev.org, and tested that they at least respond with a page that contains the input query (to remove pages that lie behind login walls).
http://0-www.sciencedirect.com.www.consuls.org/science?_ob=QuickSearchURL&_method=submitForm&_acct=C000050221&md5=0c4b6db32507e4a332b2aa6dd47a65f4&qs_all={searchTerms}&qs_author=&qs_title=&qs_vol=&qs_issue=&qs_pages=&x=34&y=15
http://0-dictionary.oed.com.library.utulsa.edu/cgi/findword?query_type=word&queryword={searchTerms}
http://100.daum.net/search/search.do?query={searchTerms}
http://1000corks.com/search?st={searchTerms}&src=myc
http://11870.com/konsulto/{searchTerms}
http://1000memories.com/search?q={searchTerms}
http://130.219.35.129/search?q={searchTerms}&btnG=Google+Search&entqr=0&output=xml_no_dtd&sort=date%3AD%3AL%3Ad1&client=default_frontend&ud=1&oe=UTF-8&ie=UTF-8&proxystylesheet=default_frontend&site=default_collection
http://1337x.org/search/{searchTerms}/0/
http://11888.ote.gr/web/guest/white-pages/search?who={searchTerms}&where=
http://140.111.34.46/cgi-bin/newDict/dict.sh?idx=dict.idx&cond={searchTerms}&pieceLen=50&fld=1&cat=&imgFont=1
@antonydevanchi
antonydevanchi / distinct-history-zsh.md
Created November 12, 2020 20:21 — forked from fundottz/distinct-history-zsh.md
Only unique commands in fzf

Remove duplicates in zsh history

To remove duplicate items in fzf prompt, add the following lines into ~/.zshrc:

setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
@antonydevanchi
antonydevanchi / disposable-email-provider-domains
Created November 12, 2020 20:19
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
@antonydevanchi
antonydevanchi / index.ts
Created November 12, 2020 20:12 — forked from nikolaymatrosov/index.ts
Yandex Cloud Cron Snapshot
import {DiskService, SnapshotService} from "yandex-cloud/api/compute/v1";
const FOLDER_ID = process.env.FOLDER_ID;
export async function handler(event, context) {
const snapshotService = new SnapshotService();
const diskService = new DiskService();
const diskList = await diskService.list({
folderId: FOLDER_ID,
// Конфгурируем Yandex.Cloud provider
provider "yandex" {
zone = "ru-central1-a"
}
// Объявляем переменную с названием Организации на гитхабе.
// К сожалению github provider не создает ресурсы `github_actions_secret` в личных репах
// https://github.com/terraform-providers/terraform-provider-github/issues/422
// К счастью базовая функциональность организаций теперь бесплатна.
variable "github_organization" {