Skip to content

Instantly share code, notes, and snippets.

View Syfaro's full-sized avatar
🦊

Syfaro

🦊
View GitHub Profile
@Syfaro
Syfaro / create-zones.py
Created April 8, 2022 21:58
Create DNS zones in Technitium DNS server to use with LanCache
# Running instructions:
#
# git clone https://github.com/uklans/cache-domains.git
# TECHNITIUM_HOST=http://technitium:5380 TECHNITIUM_USERNAME=admin TECHNITIUM_PASSWORD=password python3 create-zones.py ./cache-domains lancache-ip
import sys
import os
import json
from dataclasses import dataclass
from typing import Dict, List, Set

Keybase proof

I hereby claim:

  • I am syfaro on github.
  • I am syfaro (https://keybase.io/syfaro) on keybase.
  • I have a public key ASCkMq3UFjJVUk-3IHkojqtUHIDOwTZ9j0sgne8QfKZyfAo

To claim this, I am signing this object:

@Syfaro
Syfaro / dragon_download.py
Last active November 11, 2023 01:44
Download OBJ previews of products from Bad Dragon
from typing import List, Iterator
import os
import urllib.request
import json
from dataclasses import dataclass
import argparse
PRODUCT_URL = "https://bad-dragon.com/api/products"
SAVE_DIR = "models"
@Syfaro
Syfaro / foxbot.coffee
Created May 30, 2014 21:52
Joins the FurCast IRC channel, spams ":3"s, then leaves and randomly joins again sometime in the next day
irc = require 'irc'
client = new irc.Client 'irc.ircfox.net', 'FoxBot'
String.prototype.repeat = (num) ->
return new Array(num + 1).join this
randomNumber = (min, max) ->
return Math.floor Math.random() * (max - min) + min
@Syfaro
Syfaro / random-mutual-follower.coffee
Created February 8, 2014 04:12
A simple node.js application to choose a random mutual follower
Twit = require 'twit'
async = require 'async'
fs = require 'fs'
shuffle = require('knuth-shuffle').knuthShuffle
T = new Twit {
consumer_key: ''
consumer_secret: ''
access_token: ''
access_token_secret: ''
@Syfaro
Syfaro / csv_generator.php
Last active January 1, 2016 20:59
DNS resolution collector thing, I use RAW (https://github.com/densitydesign/raw) for stats
<?php
// this script outputs a CSV representation of the data with the domain name, the number of times the domain name has been visited, the first time it was visited (by hour) and the last time it was visited (by hour)
$conn = new PDO('mysql:host=;dbname=', '', '');
$items = $conn->query('SELECT `logs`.`id`, `logs`.`t`, `domains`.`domain` FROM `logs` INNER JOIN `domains` ON `logs`.`domain_id` = `domains`.`id`');
$things = array();
foreach($items as $item) {