Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

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

🏠
Working from home
View GitHub Profile
@majioa
majioa / mozilla.pac
Last active Dec 8, 2019
my mozilla pac settings
View mozilla.pac
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 Jan 23, 2013
Getting the Ring0 level for x86 processor series (guess i386, i486, and may be next generations)
View ring0.asm
;Как получить привелегию Ring 0
;Автор: The GSGR
;Иногда это нужно для доступа к портам выше $FF, таких как IDE контроллер и т.д.
;--------------------------------------------------
.386p
.model flat
.radix 16
Ring_0_CS_32 = 28
@majioa
majioa / elixir.md
Last active Feb 28, 2018
elixir short snaps
View elixir.md

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 Dec 19, 2015
majioa's CV
View cv.md

Credentials

Name: Malo Skrylevo

Birth date: 1977/07/30

Place of birth: Moscow

Phone: +7-905-524-5451

@majioa
majioa / rc.firewall
Created Jun 11, 2013
Firewall default script
View rc.firewall
#!/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
Smart Sharpening of an image with ImageMagick app
View smartsharp.sh
#!/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 Mar 13, 2013
System properties detection in ruby
View specmodule.rb
# 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 Jan 24, 2013
Sample CMOS utils for DOS. They allows to write and read PC CMOS.
View cmosr.asm
.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 Jan 23, 2013
The code adds a comment into old DOS created zip-archive.
View zipcomm.asm
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 Jan 23, 2013
Simple FTP mirroring tool in Ruby
View mirrorer.rb
#!/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