Skip to content

Instantly share code, notes, and snippets.

View UlisseMini's full-sized avatar
:shipit:
doing stupid stuff in the most complicated way possible

Ulisse Mini UlisseMini

:shipit:
doing stupid stuff in the most complicated way possible
View GitHub Profile
package main
import "fmt"
const (
debugLevel = iota
infoLevel
warnLevel
errorLevel
fatalLevel
@UlisseMini
UlisseMini / errors.go
Last active March 16, 2019 00:49
if you really hate `if err != nil` spam then you can use this.
// Package errors provides a way to return errors if they are not nil
// without `if err != nil { return err }` spam.
package errors
// handleError represents an error raised by ErrReturn.
// it is here to provide a diference between normal panics and error panics
type handleError struct {
err error
}
-- Sulution for https://www.seas.upenn.edu/~cis194/spring13/hw/01-intro.pdf
toDigits :: Integer -> [Integer]
toDigits n
| n < 1 = []
| otherwise = map (\x -> read [x] :: Integer) $ show n
toDigitsRev :: Integer -> [Integer]
toDigitsRev n = reverse (toDigits n)
-- taken and modified from stackoverflow to be more readable,
package main
import (
"fmt"
"os"
"os/exec"
)
func main() {
cmd := exec.Command("npm", "start")
package main
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
package main
import (
"fmt"
"math/big"
"os"
"strconv"
)
func main() {
@UlisseMini
UlisseMini / wiredolphin.lua
Last active November 10, 2018 01:49
Program to pwn rednet comunications
-- Program to pwn rednet comunications
-- Options
-- WireDoplphin replay - prompt repeating coms with custom message & sender ids
-- WireDoplphin listen - just listen and display comunications
-- TODO
-- add listening at the same time as repeating
-- more commandline options (gnu standered parsing?)
-- log how meny messages from every computer id sent and what spam was filtered
local helptext = "Usage: WireDoplphin <option>\noptions are:\nreplay - prompt repeating coms with custom message & sender ids\nlisten - just listen and display comunications"
local a=[[
Usage: ncat <option>
options are:
replay - prompt repeating coms with custom message & sender ids
fuzz - make everyone have a bad time (WIP NOT DONE YET)
listen - just listen and display comunications
]]local b={...}if#b~=1 then print("Usage: ncat <option>")return end;local c=require("math")local d={}local e=65535;local f;local g;local h;local i;local j={}for k,l in ipairs(peripheral.getNames())do if peripheral.getType(l)=="modem"then i=peripheral.wrap(l)end end;if not i then error("Failed to find modem.")end;local function m(n)if type(n)~="table"then return false end;if n.message and type(n.nMessageID)=="number"and not j[n.nMessageID]then return true end;if n.nMessageID==nil then return false end;if type(n.nMessageID)=="number"and not j[n.nMessageID]then return true end;return false end;local function o()while true do local p,p,p,q,n=os.pullEvent("modem_message")if m(n)then return q,n end end end;local function r(s)io.write(s)return io.read()end;function d.fuzz()local t,n=o()end;function d
@UlisseMini
UlisseMini / dl.go
Created November 4, 2018 03:08
downloads youtube links in new goroutines, has a strange bug where it tries to add a "" url
package main
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
"sync"
)
#!/usr/bin/python3
import os
import socket
import subprocess
import sys
from webbrowser import open_new
# Create a socket
def socket_create():
try: