Skip to content

Instantly share code, notes, and snippets.

@rmhsilva
rmhsilva / MacOS trackpad.md
Last active May 1, 2025 18:29
Accessing raw multitouch trackpad data (MacOS)
@emraher
emraher / custom.css
Created September 15, 2017 00:16
Vivaldi Custom CSS
/*==========================================================*/
/* qutebrowser-ish Vivaldi */
/*==========================================================*/
.mac #header {
min-height: 16px !important;
}
.mac #tabs-container.top {
padding-left: 0 !important;
padding-right: 0 !important;
}
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active November 14, 2024 21:20
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@OlesenkoViktor
OlesenkoViktor / PS3Dualshock_10_15.plist
Last active June 27, 2022 07:48
DualShock 3 + Mac OS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CGPDeviceCategory</key>
<string>GamePad</string>
<key>CGPDeviceType</key>
<string>PS3</string>
<key>CGPDisplayNameOvr</key>
<string>DualShock3 Analogue Triggers</string>
@jarun
jarun / fish_noti.md
Last active May 6, 2025 05:35
notification on command completion (fish shell)

Instead of waiting for long commands to finish one can easily get notifications when they are complete. The following procdure shows how to set his in fish shell.

Requirements: fish shell, notify-send, xdotool

  • Add a new file vi ~/.config/fish/functions/noti.fish with the content below:
function fish_right_prompt
    if test $CMD_DURATION
 # Check if terminal window is hidden
@Realetive
Realetive / install.sh
Created January 5, 2018 01:15
Как установить https://github.com/lyokha/vim-xkbswitch с Раскладкой Бирмана
# 1. Установить xkbswitch
git clone [email protected]:myshov/xkbswitch-macosx.git ~/.vim/plugin/xkbswitch-macosx
ln -s ~/.vim/plugin/xkbswitch-macosx/bin/xkbswitch /usr/local/bin/xkbswitch
# 2. Установить библиотеку-обёртку
git clone [email protected]:myshov/libxkbswitch-macosx.git ~/.vim/plugin/libxkbswitch-macosx
ln -s ~/.vim/plugin/libxkbswitch-macosx/bin/libxkbswitch.dylib /usr/local/lib/libxkbswitch.dylib
@Realetive
Realetive / .vimrc
Last active July 20, 2018 23:10
NeoVim
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'altercation/vim-colors-solarized'
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@hnykda
hnykda / convert.py
Created February 21, 2018 21:26
Quick and dirty conversion of ZSH history into fish
# run as `python conver.py <path-to-your-zsh-history-file>
import sys
output_file = 'fish_converted_history'
zsh_history_file = sys.argv[1]
with open(zsh_history_file, 'r', errors='ignore') as ifile:
result = []
for cmd in ifile:
@hedgejanuary
hedgejanuary / GoogleCal_to_MSTeams.js
Last active February 26, 2020 12:36
Google Calendar から今後7日間の予定を取得し、MS Teamsのスケジュール用チャンネルに投稿する。
//スケジュールアシスタントが今後7日間の予定を投稿してくれる
function GoogleCalToMSTeams() {
var list = '';
var calEvents = '';
var calendarInUse = [
// 使用するカレンダーのアドレスとそのラベリング
['[email protected]', '\n##■XXX\'s schedule\n'],
['[email protected]', '\n##■Out of office (staff)\n'],
['[email protected]', '\n##■XXX events\n'],
['[email protected]', '\n##■XXX Office events\n'],