Skip to content

Instantly share code, notes, and snippets.

View samuelcolvin's full-sized avatar

Samuel Colvin samuelcolvin

View GitHub Profile

Static site generator inspired by jekyll but much improved

Features:

  • jinja templating language
  • written in python: easy to install modify and extend
  • built in redirects, sitemap and html checking.
  • support for resusable templates, allow reference to templates dir. or list of dirs, thereby allowing just a single file to be overruled.
  • auto-reload with dev. server
  • dynamic static file names to work well with CDNs
  • support for markdown and/or restructured text
@samuelcolvin
samuelcolvin / motorola_camera_setup.md
Last active June 17, 2024 21:04
Hubble Motorola Focus 66-W Camera "CameraHD" setup

Use the Hubble app to get the camera connected to a wifi network.

Find the Camera's IP address:

> sudo arp-scan --interface=enp3s0 --localnet
Interface: enp3s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.1.100	00:19:99:0f:6a:98	Fujitsu Technology Solutions
192.168.1.102	c4:6e:1f:53:f0:8b	(Unknown)
#!/usr/bin/env sh
echo "Setting up strider and docker"
set -e
set -x
sudo apt-get update -y > /dev/null
sudo apt-get install -y mongodb curl git vim curl
@samuelcolvin
samuelcolvin / 623.py
Last active September 20, 2016 20:56
import re
import sys
from pathlib import Path
REGEXES = [(re.compile(p, f), r) for p, r, f in [
(r'^#(?: -\*-) coding: ?utf-8(?: -\*-)\n', '', 0),
(r"\.(encode|decode)\('utf-?8'\)", r'.\1()', 0),
('(class \w+)\(object\):\n', r'\1:\n', 0),
('super\(\w+, \w+\)\.', 'super().', 0),
('u"""(.*?)"""', r'"""\1"""', re.S),
[
{
"featureType": "landscape",
"elementType": "all",
"stylers": [
{
"hue": "#FFBB00"
},
{
"saturation": 43.4
#! /usr/bin/env donkey
install:
- pip install -U pip
- pip install -r requirements
runserver:
- ./manage.py runserver
sass:
exe: webpack
#!/usr/bin/env python
"""
Open helpmanual.io man pages
Samuel Colvin 2016
"""
import json
import platform
import subprocess
import shlex
import sys
import re
import shutil
from datetime import datetime
from pathlib import Path
from ..logs import tools_logger as logger
class SassEventHandler(BaseEventHandler): # from aiohtto-devtools
patterns = [
@import 'bootstrap-sass/stylesheets/bootstrap';
#!/usr/bin/env bash
# git
apt-add-repository ppa:git-core/ppa -y
# pycharm
apt-add-repository ppa:mystic-mirage/pycharm -y
apt update
apt upgrade
# from above
apt install -y git pycharm