Skip to content

Instantly share code, notes, and snippets.

View ljohnso16's full-sized avatar

Lloyd Johnson ljohnso16

View GitHub Profile
@primozcigler
primozcigler / themeforest-contract.md
Last active August 19, 2021 02:41
Modified version of @malarkey's Killing Contract for use for the ThemeForest cooperation (more dev to dev team than dev to client).

Contract for developing a Drupal theme for selling on the ThemeForest

Between us: [ProteusNet d.o.o., Rudarska cesta 11, 8281 Senovo, Slovenia, EU] and you: [partner]

Summary:

We’ll always do our best to fulfil the scope of this cooperation, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

So in short;

@garbled1
garbled1 / dawn.sh
Created May 18, 2020 16:02
Bash script to run something at dawn
#!/bin/bash
civ_tw=$(curl -s 'https://api.sunrise-sunset.org/json?lat=X&lng=Y&date=today&formatted=0' | json_pp | grep civil_twilight_begin | awk '{print $3}' | sed -e 's/[",]//g')
date_sec_ct=$(date -d ${civ_tw} +%s)
date_now=$(date +%s)
sleepsec=$((${date_sec_ct} - ${date_now}))
end_at=$((${date_sec_ct} + 3600))
echo "Sleeping for ${sleepsec}"
sleep ${sleepsec}