Skip to content

Instantly share code, notes, and snippets.

View koncybernet's full-sized avatar
😁

Kon Papazis koncybernet

😁
  • La Trobe University
  • Melbourne, Australia
View GitHub Profile
@koncybernet
koncybernet / win81-token-stealing-shellcode.asm
Created December 13, 2017 05:04 — forked from hugsy/win81-token-stealing-shellcode.asm
Token stealing shellcode for Windows 8.1 x64
;;
;; Token stealing shellcode for Windows 8.1 x64
;;
;; Save the current context on the stack
push rax
push rbx
push rcx
;; Get the current process
@koncybernet
koncybernet / latency.txt
Created May 28, 2018 06:33 — forked from mikea/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 4x mutex op, 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
@koncybernet
koncybernet / rootfs_ubuntu_16.04_btrfs.md
Created July 31, 2018 12:56 — forked from niflostancu/rootfs_ubuntu_16.04_btrfs.md
Installing Ubuntu 16.04 on btrfs using debootstrap

Installing Ubuntu 16.04 with btrfs using debootstrap

Partition layout

First, create a GPT partition table.

  1. boot partition, label: EFI, flags: boot + ESP; size: 1GB, format to FAT32;
  2. root partition (label: root), must same size on all devices!
  3. swap partition.
@koncybernet
koncybernet / fuzzypy.py
Created May 14, 2019 12:06 — forked from TutorialDoctor/fuzzypy.py
A Fuzzy Logic Experiment with Python
# Fuzzy Logic experiment (WIP)
# By the Tutorial Doctor
# Objects are not always in one of two states (true or false), but rather in several states at one time.
#(val-min)/(max-min)
#---------------------------------------------------------------------------
#VARIABLES
#------------------------------------------------------------------------------
cold =(1,213)
@koncybernet
koncybernet / pylinux.rst
Created May 23, 2019 13:16 — forked from amitsaha/pylinux.rst
Linux System Mining with Python

Update

The talk never happened, but I wrote an article on this topic: http://amitsaha.github.io/site/notes/articles/python_linux/article.html

Introduction

Most of the information that a power user or a sysadmin may need to know about a running Linux system is available in the form of plain text files. Utilities such as 'cat',' head', 'less' and 'grep' are sufficient to mine information that one may need from these files. Things however can get unwieldy when the task at hand demands writing shell scripts to couple these utilities. As much as power Linux users (including yours truly) would absolutely love to master shell scripting, the learning curve is quite steep and can be cryptic. This is certainly an opportunity to explore other ubiquitous alternatives for stitching together utility scripts. Bring in Python.

@koncybernet
koncybernet / inspect_demo.py
Created June 9, 2019 06:49 — forked from amitsaha/inspect_demo.py
Demo code using the Python inspect module
''' Demo script experimenting with various features of the
inspect module
'''
# To be run with Python3.3
from inspect_test import MyClass
from inspect_test import myfunc
from inspect_test import mygen
@koncybernet
koncybernet / wmic-install
Created July 31, 2019 05:39 — forked from rickheil/wmic-install
installing wmic for linux
#!/bin/bash
# compiles WMIC for linux
apt-get install autoconf
cd /usr/src
wget http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2
bzip2 -cd wmi-1.3.14.tar.bz2 | tar xf -
cd wmi-1.3.14/
@koncybernet
koncybernet / install-conda.sh
Created August 2, 2019 02:42 — forked from arose13/install-conda.sh
Install Miniconda in Ubuntu
# Setup Ubuntu
sudo apt update --yes
sudo apt upgrade --yes
# Get Miniconda and make it the main Python interpreter
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p ~/miniconda
rm ~/miniconda.sh
@koncybernet
koncybernet / provisioning.sh
Created August 2, 2019 04:57 — forked from sghiassy/provisioning.sh
A Bash shell script for provisioning a new Ubuntu 14.04 LTS VM built for React Native
#!/bin/bash
####################################
# Setup
####################################
tmpfile="/vagrant/.capacitor/runonce"
if [ -e ${tmpfile} ]; then
echo "Provisioning already completed. Remove ${tmpfile} to run it again."
@koncybernet
koncybernet / upgrade.sh
Created September 18, 2019 00:08 — forked from bocharsky-bw/upgrade.sh
Shell Script for Upgrade Ubuntu via APT in one step
#!/bin/bash
TEXT_RESET='\e[0m'
TEXT_YELLOW='\e[0;33m'
TEXT_RED_B='\e[1;31m'
sudo apt-get update
echo -e $TEXT_YELLOW
echo 'APT update finished...'
echo -e $TEXT_RESET