Skip to content

Instantly share code, notes, and snippets.

View SYZYGY-DEV333's full-sized avatar

SYZYGY-DEV333 SYZYGY-DEV333

View GitHub Profile
@SYZYGY-DEV333
SYZYGY-DEV333 / restart-program-20.sh
Last active January 9, 2016 00:46
A shell script to restart a program every 20 minutes.
#!/bin/bash
while :
do
sleep 1200
killall -I -q process-name
sleep 1
start-command
done
#!/usr/bin/env python
# Name of Program, version
# Author of program
# Discription
# Lisence
import os
print "Hello World!"
@SYZYGY-DEV333
SYZYGY-DEV333 / rootfinder.py
Last active February 7, 2016 13:40
Polynomial root finder in Python. Quick and dirty, but it works. Have fun! :-)
#!/usr/bin/env python
# Polynomial Root Finder
# SYZYGY-DEV333
# Apache 2.0
print "Python Polynomial Root Finder"
print "Use '**' to mean '^'"
while 1 == 1:
@SYZYGY-DEV333
SYZYGY-DEV333 / polyfactor.py
Last active February 10, 2016 22:44
Factor a polynomial using the roots
#!/usr/bin/env python
# Polynomial Root Finder
# SYZYGY-DEV333
# Apache 2.0
step = 0.001 # smaller steps are more accurate, but slower
start = -10 # these parameters should be fine at -10 and 10
stop = 10
print "Python Polynomial Factoring"
@SYZYGY-DEV333
SYZYGY-DEV333 / autorun.inf
Last active February 12, 2016 18:51
Virus example in Batch. DO NOT USE FOR MALICIOUS PURPOSES.
[autorun]
open=drive-info.bat
action=Mount USB Drive
@SYZYGY-DEV333
SYZYGY-DEV333 / slither-forcer.user.js
Last active June 18, 2016 12:09
Simple slither.io server forcer userscript
// ==UserScript==
// @name slither-forcer
// @namespace SYZYGY-DEV333
// @description Forces connection to a specific slither.io server
// @include http://slither.io/*
// @include https://slither.io/*
// @version 1.0
// @grant none
// ==/UserScript==
#!/usr/bin/python
import subprocess
import os, sys
from sys import argv
#zeroes out the first 512 bytes of the given disk. this is used to prevent partition table conflicts.
def zero_mbr(disk):
output = subprocess.call(['dd', 'if=/dev/zero', 'of=/dev/%s' % disk, 'bs=512', 'count=1'], shell=False, stdout=subprocess.PIPE)
#converts iso to dmg file using hdiutil, returns a string of the newly created dmg file for imaging
@SYZYGY-DEV333
SYZYGY-DEV333 / TicToc.go
Last active August 23, 2016 17:52
Elapsed time in Go
type TicToc struct {
tic time.Time
}
func (ticToc * TicToc) Tic() {
ticToc.tic = time.Now()
}
func (ticToc * TicToc) TocPrint() {
fmt.Println(time.Now().Sub(ticToc.tic))
@SYZYGY-DEV333
SYZYGY-DEV333 / bf2c.psh
Created September 2, 2016 23:25
BF to C translator, written in pipeslash
BF to C translator, written in pipeslash
Copyright (c) 2016 SYZYGY-DEV333
All rights reserved
Licensed under SPL 1 (splicense.pen.io)
/|||//|||//|||//|||||||//|//|||//|||//|||//|||//|||//||//||||//||||||||//|//|/
/|||//||//|||||||//|//|//|||//|||//|||//|||//|//|||//|||//|//|||//|||//|||//|||/
/|||//|//|||//|||//|||//|||//|||//|//|||//|//|//|||//||//|||//|||//|||||||//|||/
/|||//||//||||||||//|//||||//||||//||||//||||||||//|//|||//|||//|||//|||//|||||/
/|//|//|//|||||//|||//|||//|||//|||//|||//|||||//|//||||//||||//||||//||||/
@SYZYGY-DEV333
SYZYGY-DEV333 / task-killer.c
Last active January 23, 2017 15:21
Task-killer: a command-line Windows task manager/task killer in C
#include <stdio.h>
#include <stdlib.h>
// Copyright (c) 2016, SYZYGY-DEV333
// All rights reserved.
// Licensed under SPL 1.0 [splicense.pen.io]
int menu();
void lista_processos();
void mata_processo_nome();