Skip to content

Instantly share code, notes, and snippets.

🏠

Vladyslav vtronko

🏠
Block or report user

Report or block vtronko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vtronko
vtronko / pacman-yay-fzf.sh
Created Apr 8, 2020
FZF completion for pacman and yay
View pacman-yay-fzf.sh
fay() {
packages=$(awk {'print $1'} <<< $(yay -Ss $1 | awk 'NR%2 {printf "\033[1;32m%s \033[0;36m%s\033[0m — ",$1,$2;next;}{ print substr($0, 5, length($0) - 4); }' | fzf -m --ansi))
[ "$packages" ] && yay -S $(echo "$packages" | tr "\n" " ")
}
fzfman() {
packages="$(awk {'print $1'} <<< $(pacman -Ss $1 | awk 'NR%2 {printf "\033[1;32m%s \033[0;36m%s\033[0m — ",$1,$2;next;}{ print substr($0, 5, length($0) - 4); }' | fzf -m --ansi --select-1))"
[ "$packages" ] && pacman -S $(echo "$packages" | tr "\n" " ")
}
View captcher.py
import json, requests, urllib
url = 'https://2ch.hk/api/captcha/2chaptcha/id'
imageurl = 'https://2ch.hk/api/captcha/2chaptcha/image/'
count = 100
dirname = '/home/innermous/Downloads/' # leave this field empty to download into current directory
for x in range(0, count):
r = requests.get(url)
View toolbutton.patch
From 38901807f7b2918986a8ea0c206cfb2da91427da Mon Sep 17 00:00:00 2001
From: Vladislav Tronko <innermous@gmail.com>
Date: Wed, 17 Aug 2016 10:49:48 +0300
Subject: [PATCH] Distinguish clicked and controlclicked in ToolButton
---
src/lib/tools/toolbutton.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lib/tools/toolbutton.cpp b/src/lib/tools/toolbutton.cpp
View reader_writer.c
// common.h
#define MEMORY_KEY 13
#define ARRAY_SIZE 8
struct wrapper {
sem_t s_read;
sem_t s_write;
int readcount;
int array[ARRAY_SIZE];
View produser_consumer.c
// common.h
#define MEMORY_KEY 145
#define SIZE_OF_ARRAY 10
struct wrapper
{
int array[SIZE_OF_ARRAY];
sem_t empty;
sem_t pmutex;
sem_t cmutex;
You can’t perform that action at this time.