Skip to content

Instantly share code, notes, and snippets.

View RustemB's full-sized avatar
🥺
👉👈

Rustem B. RustemB

🥺
👉👈
View GitHub Profile
#!/bin/bash
for i in '216 9 126' '216 9 126' '140 87 156' '36 70 142' '36 70 142'; do
printf '\e[48;2;%sm%20s\e[m\n' ${i// /;}
done
#!/usr/bin/env python3
import urllib.request as ur
import urllib.parse as up
from sys import argv
WEBHOOK_URL = "https://api.telegram.org"
BOT_API = "HERE_YORS_BOT_TOKEN_FROM_BOTFATHER"
DATA = up.urlencode({
'text': argv[1],
@RustemB
RustemB / vimrc
Created May 10, 2020 17:19 — forked from meskarune/vimrc
simple functional vim status line - jellybeans theme colors
" status bar colors
au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta
au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
" Status line
" default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
" Status Line Custom
let g:currentmode={
# from http://zzapper.co.uk/vimtips.html
------------------------------------------------------------------------------
" new items marked [N] , corrected items marked [C]
" *best-searching*
/joe/e : cursor set to End of match
3/joe/e+1 : find 3rd joe cursor set to End of match plus 1 [C]
/joe/s-2 : cursor set to Start of match minus 2
/joe/+3 : find joe move cursor 3 lines down
/^joe.*fred.*bill/ : find joe AND fred AND Bill (Joe at start of line)
/^[A-J]/ : search for lines beginning with one or more A-J
@RustemB
RustemB / ffmpeg-compress-mp4
Last active March 8, 2019 13:43 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@RustemB
RustemB / project_decimal_to_bin.py
Last active November 15, 2018 16:51
Convert decimal to binary
from decimal import Decimal as D
from math import pi, e
def convert(n, d=8):
"""
convert decimal to binary
"""
res = bin(int(n))[2:] + "."
x = D(n - int(n))
while d != 0: