Skip to content

Instantly share code, notes, and snippets.

View rpeshkov's full-sized avatar

Roman Peshkov rpeshkov

View GitHub Profile
@rpeshkov
rpeshkov / jump-related.kt
Created March 14, 2021 01:19
Jump to related file. LivePlugin
@rpeshkov
rpeshkov / config.h
Created January 15, 2021 15:39
AnnePro2 QMK layout
#pragma once
#define TAPPING_FORCE_HOLD_PER_KEY
defaults write org.gnu.Emacs CGFontRenderingFontSmoothingDisabled -bool NO
defaults write com.jetbrains.WebStorm CGFontRenderingFontSmoothingDisabled -bool NO
#!/bin/bash
current_x=$(MouseTools -location | head -1)
echo $current_x
if [ "$current_x" -gt "1920" ]; then
MouseTools -x 1000 -y 200 -leftClick
else
MouseTools -x 2000 -y 200 -leftClick
@rpeshkov
rpeshkov / settings.sh
Created October 31, 2019 19:39
VSCode ripgrep
function codegrep() {
rg --vimgrep --color=always $* | fzf --ansi | cut -d: -f 1-3 | xargs code . -g
}
alias cj=codegrep
"\x00\x00\x19\x00\x6f\x08\x00\x00\xc9\xca\xbe\xb4\x00\x00\x00\x00" \
"\x10\x02\x6c\x09\x80\x04\xd5\x9b\x00\x80\x00\x00\x00\xff\xff\xff" \
"\xff\xff\xff\x64\x7c\x34\x5c\x1c\x40\x64\x7c\x34\x5c\x1c\x40\xa0" \
"\x66\x80\xf1\x94\xd4\x03\x02\x00\x00\x64\x00\x11\x04\x00\x0a\x55" \
"\x50\x43\x35\x34\x32\x34\x32\x39\x37\x01\x08\x82\x84\x8b\x96\x0c" \
"\x12\x18\x24\x03\x01\x01\x05\x04\x00\x01\x00\x00\x07\x06\x43\x5a" \
"\x20\x01\x0d\x14\x2a\x01\x04\x32\x04\x30\x48\x60\x6c\x2d\x1a\xad" \
"\x01\x1b\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x04\x06\xe6\xe7\x0d\x00\x3d\x16\x01\x00\x17\x00\x00" \
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
@rpeshkov
rpeshkov / file.sh
Created May 11, 2018 22:55
One-liners
# Get latest hugo
wget $(curl -s https://api.github.com/repos/gohugoio/hugo/releases | grep browser_download_url | grep '64bit[.]deb' | head -n 1 | cut -d '"' -f 4)
@rpeshkov
rpeshkov / set-primary-monitor-pantheon-greeter
Created March 18, 2018 22:46 — forked from RyanMillerC/set-primary-monitor-pantheon-greeter
Set correct primary monitor for login screen when lightdm greeter starts up on Elementary OS
#!/bin/bash
#
# Created: 2017-07-02 16:20
# Updated: 2018-02-09 12:23
# Creator: Ryan Miller
# Website: http://devopsmachine.com/
# File: /usr/local/bin/set-primary-monitor-pantheon-greeter
#
# Set correct primary monitor for login screen when lightdm greeter starts up on Elementary OS.
#
@rpeshkov
rpeshkov / runme.sh
Last active March 23, 2018 23:20
Macos settings
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write com.apple.dock autohide-time-modifier -float 0.15
defaults write com.apple.dock autohide-delay -int 0
# Auto-expand save dialog
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
@rpeshkov
rpeshkov / gist:d4734e5df5186d3b9cc2
Created May 21, 2014 09:23
Wordpress function that displays tag cloud for specific post type
function pt_tag_cloud( $args = '' ) {
$defaults = array(
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC',
'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true,
);
$args = wp_parse_args( $args, $defaults );
$post_type = $args['post_type'];
global $wpdb;