Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var force = d3.layout.force() | |
.charge(-150) | |
.linkDistance(30) | |
.size([width, height]); | |
d3.json("assets/500nodes.json", function(error, graph) { | |
if (error) throw error; | |
// Task 2: | |
// Connect the force layout to the nodes and links in our dataset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
if [[ -z $1 ]]; then | |
printf 'Must supply a path\n' | |
exit 1 | |
fi | |
# We want to advertise a consistent volume UUID that will survive reprovisions. | |
zone_uuid=$(zonename) | |
bonjour_name="$(hostname -s).local" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createAnvil } from '@viem/anvil' | |
import 'dotenv/config' | |
import { $ } from 'bun' | |
import path from 'path' | |
import z from 'zod'; | |
import { fromError } from 'zod-validation-error' | |
////////////////////// | |
// Env validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
see: https://gist.github.com/UniIsland/3346170 | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
# MIT license, do whatever you want with it | |
# | |
# This is my invoice.php page which I use to make invoices that customers want, | |
# with their address on it and which are easily printable. I love Stripe but | |
# their invoices and receipts were too wild for my customers on Remote OK | |
# | |
require_once(__DIR__.'/../vendor/autoload.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LogFile=/var/log/cache_backup.log | |
BackupDir=/mnt/disk6/cache_backup | |
echo `date` "Starting cache drive backup to " $BackupDir >> $LogFile | |
#Stop plugin services located in /etc/rc.d/ | |
# enter in plugins to stop here, if any | |
# /etc/rc.d/rc.plexmediaserver stop >> $LogFile |
NewerOlder