Skip to content

Instantly share code, notes, and snippets.

@Nuxij
Nuxij / movie-trailers-download.go
Created June 1, 2022 19:19
Get latest trailers from filmjabber.com
package main
import (
"fmt"
"io"
"log"
"net/url"
"os"
"strings"
@Nuxij
Nuxij / masscan.Dockerfile
Last active June 16, 2021 01:13
[Docker] masscan on alpine
# Example:
# $ docker build -t masscan -f masscan.Dockerfile .
# $ docker run --rm -it --net=host masscan -p0-65535 192.168.0.0/16 --rate 1000000
# --net=host is optional but I saw rate limit without it
# -v $(pwd):/opt if you want to feed result files back out
FROM alpine as builder
LABEL author "Peng Liu"
LABEL email "myme5261314@gmail.com"
ARG MASSCAN_GIT_URL=https://github.com/robertdavidgraham/masscan
@Nuxij
Nuxij / twilio.php
Last active August 29, 2015 14:17
Twilio message forwarder
<?php
require 'twilio-php/Services/Twilio.php';
include 'marg/marg.php';
class Messenger {
private $AccountSid = "guff";
private $AuthToken = "junk";
private $ourNumber = "+440987654321";
private $validSenders = array(
"+441234567890" => "Joe Eaves"
@Nuxij
Nuxij / run.js
Created March 11, 2015 08:15
BackGammon board mappings in JS
/*
Red 0 == Black 25
Red 1 == Black 24 == R1
Black 1 == Red 24 == B1
Red 12 == Black 13 == R12
Black 12 == Red 13 == B12
*/
// map a color place to a bpard position
var x = function(pos, color) {
@Nuxij
Nuxij / ftp.sh
Last active August 29, 2015 14:05
Background FTP session, with processable output
#!/bin/bash
# Make the fifos
mgmtFifo="/tmp/.ftp.mgmt.fifo"
cmdFifo="/tmp/.ftp.cmd.fifo"
outFifo="/tmp/.ftp.out.fifo"
mkfifo "$mgmtFifo"
mkfifo "$cmdFifo"
mkfifo "$outFifo"
@Nuxij
Nuxij / sort.py
Last active August 29, 2015 14:02
Will sort a directory of image files into subfolder by resolution
#!/usr/bin/env python
# sort.py: sorts images in to subfolders based on resolution
from PIL import Image
from os import path, mkdir
from shutil import move
from glob import glob
class ImageSorter:
imageFormats = ("jpg", "png")