Skip to content

Instantly share code, notes, and snippets.

View Nickfost's full-sized avatar
🐌
Snail

Nick Foster Nickfost

🐌
Snail
View GitHub Profile
### Keybase proof
I hereby claim:
* I am Nickfost on github.
* I am nickfost (https://keybase.io/nickfost) on keybase.
* I have a public key whose fingerprint is 408C 706E D349 E02F DAF9 2EA0 7026 C67D A9C2 E6C6
To claim this, I am signing this object:
@Nickfost
Nickfost / Archive Warrior Docker install script for Vultr
Created March 22, 2019 07:55
This installs docker, pulls the project deploys 4 Archive Warrior Instances, Updates Debian based Os, Reboots.
#!/bin/sh
# NOTE: This installs docker, pulls the project deploys 4 Archive Warrior Instances, Updates Debian based Os, Reboots.
# Nickfost.net
@Nickfost
Nickfost / Simple downloads page.
Last active August 29, 2015 14:13
This gist allows you to create simple downloads page for a whole directory.
<?php
/**
* Simple downloads page.
* @author Nick Foster <me@nickfost.net>
*/
// CONFIG
$privatedir = "/";
$publicdir = "/";
## 15 minute blocks wait exmaple
import os
from datetime import datetime
def wait_for_twitter_limit():
now = datetime.now()
issuetime = now.minute
if issuetime < 15:
goodtime = 30
@Nickfost
Nickfost / gist:9302984
Created March 2, 2014 07:00
Bitly Function
//explode $data into a $line and explode line into a $word and check if it's a url then pass it bitly and return that url
function bitly($data){
//token
$token = ""; // you must add your api token here
//break into line by line
$linearray = explode("\n",$data);
$linei = 0;
foreach($linearray as $line){
$wordarray = explode(" ",$line);
$wordi = 0;