Skip to content

Instantly share code, notes, and snippets.

View majioa's full-sized avatar
🏠
Working from home

Павел "Malo" Скрылёв majioa

🏠
Working from home
View GitHub Profile
@majioa
majioa / mozilla.pac
Last active March 22, 2022 05:19
my mozilla pac settings
function FindProxyForURL(url, host) {
host = host.toLowerCase();
if (dnsDomainIs(host, "linkedin.com") ||
dnsDomainIs(host, "rutracker.org") ||
dnsDomainIs(host, "ipleak.net") ||
dnsDomainIs(host, "telegram.org") ||
dnsDomainIs(host, "t.me") ||
dnsDomainIs(host, "telegra.ph") ||
dnsDomainIs(host, "psb4ukr.org") ||
dnsDomainIs(host, "plus.pl") ||
@majioa
majioa / ring0.asm
Created January 23, 2013 07:11
Getting the Ring0 level for x86 processor series (guess i386, i486, and may be next generations)
;Как получить привелегию Ring 0
;Автор: The GSGR
;Иногда это нужно для доступа к портам выше $FF, таких как IDE контроллер и т.д.
;--------------------------------------------------
.386p
.model flat
.radix 16
Ring_0_CS_32 = 28
@majioa
majioa / elixir.md
Last active February 28, 2018 08:46
elixir short snaps

Basic types

iex> 1          # integer
iex> 0x1F       # integer
iex> 1.0        # float
iex> true       # boolean
iex> :atom      # atom / symbol
iex> "elixir"   # string
iex> [1, 2, 3]  # list

iex> {1, 2, 3} # tuple

@majioa
majioa / cv.md
Last active December 19, 2015 05:59
majioa's CV

Credentials

Name: Malo Skrylevo

Birth date: 1977/07/30

Place of birth: Moscow

Phone: +7-905-524-5451

@majioa
majioa / rc.firewall
Created June 11, 2013 13:33
Firewall default script
#!/bin/sh
# (c) Malo Skrylevo
set -x
#service $IPTABLES restart
# interfaces IF0 - external LAN iface, IF1,IF2 - internal LAN ifaces
IF0=enp2s0
@majioa
majioa / smartsharp.sh
Created May 8, 2013 07:07
Smart Sharpening of an image with ImageMagick app
#!/bin/bash
sharp_radius=5
sharp_sigma=$(dc <<< 4k${sharp_radius}vp)
sharp_amount=1.2
sharp_threshold=0.003
a1=0
b1=0
c1=1.2
d1=-0.1
@majioa
majioa / specmodule.rb
Created March 13, 2013 07:33
System properties detection in ruby
# origin is here: http://stackoverflow.com/questions/11784109/detecting-operating-systems-in-ruby
require 'rbconfig'
module SpecModule
def self.os
@os ||= (
host_os = RbConfig::CONFIG['host_os']
case host_os
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
:windows
@majioa
majioa / cmosr.asm
Created January 24, 2013 11:00
Sample CMOS utils for DOS. They allows to write and read PC CMOS.
.MODEL SMALL
COD SEGMENT PARA
ASSUME CS:COD,DS:COD
ORG 100H
START:
XOR AX,AX
MOV CX,256
LEA DI,BUF
PUSH CS
PUSH CS
@majioa
majioa / zipcomm.asm
Created January 23, 2013 12:07
The code adds a comment into old DOS created zip-archive.
ASSUME CS:CGR,DS:CGR
CGR GROUP COD,DAT
COD SEGMENT BYTE
ORG 100H
ZIPCOMM proc
LEA SI,C_
CALL WW
MOV SI,80H
MOV AH,'/'
CALL READ_FILE_STRING
@majioa
majioa / mirrorer.rb
Created January 23, 2013 07:32
Simple FTP mirroring tool in Ruby
#!/usr/bin/ruby
require 'net/ftp'
require 'net/http'
require 'fileutils'
class String
def to_l(srcl,dstl)
val = gsub(/(["'\&\(\)])/) { "\\" + $1 }
`echo #{val} |iconv -f #{srcl} -t #{dstl}`.sub(/\n/,"")
end