Skip to content

Instantly share code, notes, and snippets.

Peace and Love

AkhIL akhilman

Peace and Love
View GitHub Profile
akhilman / webdav-nginx.conf
Last active Oct 22, 2021
Fixes for nginx's webdav to work with gvfs clients.
View webdav-nginx.conf
location /webdav {
alias /srv/webdav;
client_body_temp_path /srv/webdav/.tmp;
client_max_body_size 100G;
dav_ext_methods PROPFIND OPTIONS LOCK;
create_full_put_path on;
dav_access group:rw all:rw;
autoindex on;
akhilman / yggdrasil
Last active Feb 13, 2021
Yggdrasil init script for SystemV
View yggdrasil
# Provides: yggdrasil
# Required-Start: $local_fs
# Required-Stop:
# Should-Start: $network $portmap
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Overlay network
akhilman / dropbear
Last active Dec 17, 2020
Dropbear init script for SystemV
View dropbear
# Provides: dropbear
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Lightweight SSH server
# Description: Init script for drobpear SSH server. Edit
# /etc/default/dropbear to configure the server.
akhilman /
Last active Dec 17, 2020
Convert antix live USB to f2fs
if [ $# -ne 1 ] || ! [ -b $1 ]; then
echo Usage:
echo $(basename $0) boot_part
exit 1
if [ $(whoami) != root ]; then
echo you are not root
akhilman / code-block.ts
Last active May 4, 2020
code-block web component
View code-block.ts
import { LitElement, html, css, property, customElement } from "lit-element";
import { unsafeHTML } from "lit-html/directives/unsafe-html";
import * as hljs from "highlight.js";
export class CodeBlock extends LitElement {
@property() lang = "";
private contentUpdateObserver?: MutationObserver = undefined;
static get styles() {
akhilman /
Created Aug 29, 2018
asynchron but without eventloop client for aiozmq rpc.
Based on synchronous implementation of the aiozmq.rpc.RPCClient
import functools
import logging
import os
import random
import struct
import sys
import sys
import gi
gi.require_version('Clutter', '1.0')
gi.require_version('Gtk', '3.0')
gi.require_version('GtkClutter', '1.0')
from gi.repository import Clutter # isort:skip
from gi.repository import Gtk # isort:skip
akhilman /
Created Nov 25, 2017 — forked from anonymous/
numpy array buffer which acts as deque
import enum
import logging
import unittest
import numpy as np
class Side(enum.IntEnum):
NONE = 0
LEFT = 1
akhilman / ssh proxy
Last active Apr 17, 2018
ssh proxy с ограниченным дооступом
View ssh proxy
создаем пользователя pxy
adduser pxy
закрываем ему доступ к locahost, eth0 заменить на интерфейс смотрящий в интернет
iptables -A OUTPUT -m owner --uid pxy -p tcp -o lo --dport 53 -j ACCEPT # allow dns
iptables -A OUTPUT -m owner --uid pxy -o !eth0 -j DROP # deny localhost
ip6tables -A OUTPUT -m owner --uid pxy -p tcp -o lo --dport 53 -j ACCEPT # allow dns
ip6tables -A OUTPUT -m owner --uid pxy -o !eth0 -j DROP # deny localhost
генерируем ssh ключи, добавляем публичный ключь в ~pxy/.ssh/authorized_keys вставив перед ним:
akhilman /
Created Jul 21, 2016
Controller that creates window
class TKViewController(CementBaseController):
class Meta:
label = "tkview"
stacked_on = 'base'
stacked_type = 'nested'
arguments = [
dict(help='dataset to show',
action='store', metavar='DATASET', nargs='?')