Skip to content

Instantly share code, notes, and snippets.

View spellancer's full-sized avatar

Sarkis Nanyan spellancer

  • Russian Federation
View GitHub Profile
@spellancer
spellancer / Makefile
Created April 18, 2019 20:50 — forked from moloch--/Makefile
Basic cross-platform reverse shell in Go
EXE = shell
SRC = .
LDFLAGS = -ldflags="-s -w"
windows:
GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC)
macos:
GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC)
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/vundle'
Plugin 'mileszs/ack.vim'
Plugin 'avakhov/vim-yaml'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
import csv
from collections import OrderedDict
with open('b.csv', 'rb') as f:
r = csv.reader(f)
dict2 = {row[0]: row[1:] for row in r}
with open('a.csv', 'rb') as f:
r = csv.reader(f)
dict1 = OrderedDict((row[0], row[1:]) for row in r)
@spellancer
spellancer / bjd.md
Last active March 15, 2016 11:25
BJD

Часть 1 - Анализ негативных факторов на рабочем месте инженера исследователя

Документация (ссылки вида док. №):

  1. СанПин 2.2.2/2.4.1340-03 - нормы
  2. микроклимат: СанПин 2.2.4.548-96
  3. МУК 4.1.900-00 - требоваия к пластмассам
  4. ГН 2.1.6.1338-03 - ПДК
  5. ГН 2.1.6.1339-03 - ОБУВ
  6. ПУЭ-2007
#!/bin/bash
if [ -z "$1" ] ; then
echo "Usage: command interface "
else
sudo tcpdump -nn -v -i $1 -s 1500 -c 1 'ether[20:2] == 0x2000' | grep -E 'Device-ID|Port-ID'
fi
# -*- coding: utf-8 -*-
# Вариант 10. Нанян Саркис АК5-101
from math import exp
M = 25
Hf = 0.1
Gw_1 = 1
Gw_2 = 3
def st (e1,e2,d1,d2):
st = e1 * (M ** d1) + e2 * Hf * (M ** d2)
PS1='\[\e[0;31m\]\u@\[\e[1;35m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;37m\]'
function pretty(input) {
return JSON.stringify(input, null, '\t');
}
function pp(input) {
console.log(pretty(input));
}
function output(input) {
$('.output').append('<p>' + input + '</p>');
#!/usr/bin/python
# -*- coding: utf-8 -*-
import copy
import sys
from pprint import pprint
max = 16
graf = {1: {4: 3, 'v': 1}, 2: {5: 1, 'v': 3}, 3: {13: 3, 'v': 2},
@spellancer
spellancer / lab3.py
Last active August 29, 2015 14:08 — forked from Kanst/lab3.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import copy
import sys
from pprint import pprint
#max = 16
m = 23