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 / rot13.psh
Created May 24, 2017 17:39
ROT-13 in Pipeslash
/||||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||/
/|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||/
/|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||/
/||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||/
/|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||/
/|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||/
/||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||/
/|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||/
/|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||/
/||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||//||||//|||||||//|//|||//||/
@SYZYGY-DEV333
SYZYGY-DEV333 / rot13.bf
Created May 22, 2017 17:54
ROT-13 BF and PSH
-,+[ Read first character and start outer character reading loop
-[ Skip forward if character is 0
>>++++[>++++++++<-] Set up divisor (32) for division loop
(MEMORY LAYOUT: dividend copy remainder divisor quotient zero zero)
<+<-[ Set up dividend (x minus 1) and enter division loop
>+>+>-[>>>] Increase copy and remainder / reduce divisor / Normal case: skip forward
<[[>+<-]>>+>] Special case: move remainder back to divisor and increase quotient
<<<<<- Decrement dividend
] End division loop
]>>>[-]+ End skip loop; zero former divisor and reuse space for a flag
@SYZYGY-DEV333
SYZYGY-DEV333 / LICENCE.txt
Last active May 5, 2018 20:19
Simple Permissive License, v1
Simple Permissive License 1.0
[bit.ly/splicense]
Copyright (c) [year], [holder]
All rights reserved.
Redistribution and use in source or compiled forms, with or
without modification, are permitted provided that the following
conditions are met:
@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();
@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 / 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))
#!/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 / 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==
@SYZYGY-DEV333
SYZYGY-DEV333 / while-loop.scm
Created March 9, 2016 00:11
Simple while loop macro in Chicken Scheme
;; Chicken Scheme
;; While Macro in Chicken Scheme
;; SYZYGY-DEV333
;; Apache v2
(define-syntax loop
(ir-macro-transformer
(lambda (expr inject compare)
(let ((body (cdr expr)))
`(call-with-current-continuation
@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"