Skip to content

Instantly share code, notes, and snippets.

View lysukhin's full-sized avatar

Daniil Lysukhin lysukhin

View GitHub Profile
@bushaev-denis
bushaev-denis / midpass.js
Last active April 6, 2024 14:09
Midpass calendar notify has available record
const beep = () => {
const context = new AudioContext();
const oscillator = context.createOscillator();
oscillator.type = "sawtooth";
oscillator.frequency.value = 1200;
oscillator.connect(context.destination);
oscillator.start();
if (confirm("Появилась запись")) {
oscillator.stop();
}
@mowshon
mowshon / moviepy-zoom-in-effect.py
Last active April 16, 2024 11:31
Zoom-in Effect for Moviepy. This function makes the zoom effect smoother.
import moviepy.editor as mp
import math
from PIL import Image
import numpy
def zoom_in_effect(clip, zoom_ratio=0.04):
def effect(get_frame, t):
img = Image.fromarray(get_frame(t))
base_size = img.size
@gpchelkin
gpchelkin / shadowsocks-rust-server.sh
Last active March 13, 2024 14:55
How to Setup shadowsocks-rust Server with xray-plugin (or v2ray-plugin) on Any Linux Host
#!/usr/bin/env bash
# https://github.com/shadowsocks/shadowsocks-rust/releases
export SSVERSION=v1.18.2
export SSPORT=143
export SSPASSWORD="CHANGEME"
export SSARCHIVE="shadowsocks-${SSVERSION}.x86_64-unknown-linux-gnu.tar.xz"
#export SSARCHIVE="shadowsocks-${SSVERSION}.aarch64-unknown-linux-gnu.tar.xz"
export PREFIX=/usr/local/bin
@winguse
winguse / Tenda U9 on linux.md
Last active October 20, 2023 09:40
Tenda U9 on linux

Two files:

  • /etc/usb_modeswitch.d/rtl8821cu
  • /usr/share/usb_modeswitch/0bda:1a2b
TargetVendor=0x0bda
TargetProduct=0x1a2b
StandardEject=1
@gaquino
gaquino / gist:87bdf0e6e852e445c0489379d3e9732a
Last active April 15, 2024 06:52
MacOS (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools))
If you are facing an error like that on new MacOS version.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode command line, open a Terminal and run this command:
$ xcode-select --install
Note:
If you want to download and install Command Line tools manually, it can be downloaded from: https://developer.apple.com/download/more/
@omoindrot
omoindrot / tensorflow_finetune.py
Last active February 25, 2024 15:00
Example TensorFlow script for fine-tuning a VGG model (uses tf.contrib.data)
"""
Example TensorFlow script for finetuning a VGG model on your own data.
Uses tf.contrib.data module which is in release v1.2
Based on PyTorch example from Justin Johnson
(https://gist.github.com/jcjohnson/6e41e8512c17eae5da50aebef3378a4c)
Required packages: tensorflow (v1.2)
Download the weights trained on ImageNet for VGG:
```
wget http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 27, 2024 00:18
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname