Skip to content

Instantly share code, notes, and snippets.

Bahtiar Gadimov kalkin

Block or report user

Report or block kalkin

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
View github-list-repos
# Author: Bahtiar `kalkin-` Gadimov <>
# Shell script to list all the repositories of a user or organization.
# This script depends only on curl(1). It will list only the first 10,000 repos.
# Keep in mind that Github limits API requests for non authenticated users.
# License: Public Domain
View qb4 build file
# vim: ft=make ts=4 sw=4
# Ready to use config for full build of the Qubes OS 4.0 (as of yet, unreleased)
GIT_PREFIX ?= QubesOS/qubes-
kalkin / vmm
Created Apr 25, 2016
Execute an action or command on currently focused domain (This script is for QubesOS)
View vmm
set -e
# vim: fdm=marker sw=4 ts=4 tw=80
# Author: Bahtiar `kalkin-` Gadimov <>
print_help() {
echo "Usage: vmm [-hHKRSX] [-n VM_NAME] [COMMAND]"
echo "Execute an action or command on currently focused domain"
echo 'Commands:'
View Parsing Haml with Perl6.pm6
use v6;
use Inline::Perl5;
use Text::Haml:from<Perl5>;
my $haml =;
my $html = $haml.render_file('index.haml');
say $html;
View Exception.pm6
my role X::Comp { ... }
my class X::ControlFlow { ... }
my class Exception {
has $!ex;
has $!bt;
method backtrace(Exception:D:) {
if $!bt { $!bt }
elsif nqp::isconcrete($!ex) {
import fcntl
from ansible.callbacks import vvv, vv
from ansible import errors
from ansible import utils
from qubes.qubes import QubesVmCollection
import subprocess
import os
import logging
log = logging.getLogger('Ansible Qubes Connection')
module: qvm
short_description: check state presence/absence/running/halted of a qubes vm
- check presence/absence/running/halted of a qubes vm. If a vm is not
running it will be started. If vm is not halted it will be stopped.
kalkin / gist:ef0b0fa656eb298be4b0
Created Dec 28, 2014
Thinkpad X220 Centos 7 Rotate Script
View gist:ef0b0fa656eb298be4b0
case $(xrandr|grep LVDS|sed -e 's/(.*$//'|cut -d" " -f5) in
"") # Screen is not rotated, we should rotate it right (90°)
xrandr -o 3
*) # screen is rotated, we should set it normal (0°)
xrandr -o 0
View qls
# vim: fdm=marker sw=4 ts=4 tw=80
# Author: Bahtiar `kalkin-` Gadimov <>
set -e
print_help() {
echo "Usage: qls [-1ahrstAHNPT]"
echo "Print QubesVMs. By default only running and transient vms are printed"
echo "Optional arguments:"
View QubesOS Zsh Completion
_qvm-run() {
local app_vms
app_vms=( $(qvm-ls --raw-list|grep -v "^dom0$") )
local exc=
if (( words[(I)--all] )); then
exc="*--exclude=[When --all is used: exclude this VM name (may be repeated)]:QubesVMs:($app_vms)"
_arguments -S '(-a --auto)'{-a,--auto}'[Auto start the VM if not running]'\
You can’t perform that action at this time.