Skip to content

Instantly share code, notes, and snippets.

View bukalov's full-sized avatar
:octocat:

Alexander Bukalov bukalov

:octocat:
View GitHub Profile
@bukalov
bukalov / README.md
Created February 23, 2024 08:28 — forked from zhiguangwang/README.md
Installing and running shadowsocks on Ubuntu Server

Installing and running shadowsocks on Ubuntu Server

16.10 yakkety and above

  1. Install the the shadowsocks-libev package from apt repository.

     sudo apt update
     sudo apt install shadowsocks-libev
    
  2. Save ss.json as /etc/shadowsocks-libev/config.json.

@bukalov
bukalov / ss+v2ray+cf-wss+ubuntu.sh
Created September 22, 2023 05:45 — forked from whoizit/ss+v2ray+cf-wss+ubuntu.sh
shadowsocks v2ray-plugin cloudflare-wss ubuntu.sh
#!/bin/sh -e
# For Ubuntu 18.04
# How to launch:
# $ curl https://gist.githubusercontent.com/whoizit/5d29de6161270c7eb20c079add6019d2/raw/ss+v2ray+cf-wss+ubuntu.sh
# $ sh ss+v2ray+cf-wss+ubuntu.sh
[ ${EUID:-$(id -u)} -eq 0 ] && {
echo "This script must NOT be run as root"
exit
}

Install ffmpeg

brew install ffmpeg

Download file through url, like this:

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
@bukalov
bukalov / xiaomi-enable-mesh-telnet.py
Created August 28, 2023 11:02 — forked from jmceleney/xiaomi-enable-mesh-telnet.py
Python3 file that enables netmode4 on a Xiaomi RB01 AX3200 router
import ssl
import socket
# This script simply replays one side of an intercepted conversation between two Xiaomi
# RB01 (International) AX3200 routers negotiating meshing.
# In effect the script poses as a mesh slave, which causes the mesh master to enable netmode4.
# Enabling netmode is needed as one step in unlocking the router and flashing OpenWrt.
# The router should already have been taken through basic set-up before running this script.
# Netmode4 can be confirmed with curl by requesting the following URL, where ${token} is the "stok"
# variable from your admin session:
@bukalov
bukalov / multiple_ssh_setting.md
Created September 9, 2022 05:55 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@bukalov
bukalov / Social RESTful URLs snippet.md
Created July 3, 2016 17:22 — forked from dr-dimitru/Social RESTful URLs snippet.md
Social links, +1s and shares using only HTML (no JS)
@bukalov
bukalov / share-counts1.md
Last active July 2, 2016 10:42 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@bukalov
bukalov / meta-tags.md
Created December 14, 2015 17:46 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>