Skip to content

Instantly share code, notes, and snippets.

View onezerodigits's full-sized avatar
⌨️
probably typing into a text file

onezerodigits

⌨️
probably typing into a text file
View GitHub Profile
@onezerodigits
onezerodigits / gist:c136dbc84e5424dea559
Created September 23, 2014 21:50
Keybase: nsteiner
### Keybase proof
I hereby claim:
* I am nsteiner on github.
* I am nsteiner (https://keybase.io/nsteiner) on keybase.
* I have a public key whose fingerprint is 27E9 2398 76C5 DC82 4A0F 8D6D BBF1 7F95 5E0D 3CEB
To claim this, I am signing this object:
@onezerodigits
onezerodigits / golden.css
Created January 9, 2015 22:07
Almost always useful CSS snippets to paste into new projects
*, *:before, *:after {
box-sizing: border-box;
}
a {
text-decoration: none;
img {
border: 0;
}
}
@onezerodigits
onezerodigits / sidr.scss
Created June 25, 2015 14:11
Minimal SCSS for Sidr
// Minimal initial style of sidebar if you're using Sidr
// http://www.berriart.com/sidr/
$sidebar-width : 260px;
$sidebar-width-neg : -260px;
.sidr{
display:none;
position:absolute;
position:fixed;
@mixin link-colors($normal, $hover: null, $active: $hover, $visited: null, $focus: null) {
color: $normal;
&:visited { color: $visited; }
&:focus { color: $focus; }
&:hover { color: $hover; }
&:active { color: $active; }
}
@onezerodigits
onezerodigits / slider.php
Last active June 11, 2019 10:44
An image slider you can use via Kirbytext for Kirby CMS
<?php
kirbytext::$tags['slider'] = array(
'html' => function($tag) {
$html = '<div class="slider js_slider">';
$html .= '<div class="frame js_frame">';
$html .= '<ul class="slides js_slides">';
foreach($tag->page()->images()->filterBy('filename', '*=', $tag->attr('slider')) as $slide) {
@onezerodigits
onezerodigits / v2g.txt
Created October 16, 2017 17:56
mltshp video to gif bookmarklet
javascript:(function()%7Bvar%20l%20%3D%20window.location%3Bvar%20c%20%3D%20l.pathname.split(%20'%2F'%20)%3Bvar%20i%20%3D%20c%5B2%5D%3Bwindow.open('https%3A%2F%2Fmltshp-cdn.com%2Fr%2F'%2Bi)%7D)()
@onezerodigits
onezerodigits / Eleventy Assets
Last active January 15, 2018 04:17
Really simple asset management with Eleventy
Add a folder called _assets/ to put all the files you'll reference (use subfolders if you like).
Setup npm with "npm init" if you don't already have a package.json and add the scripts section in the other file of this gist.
Run "npm start" to both copy over the assets and start up eleventy (re-run if you add assets).
@onezerodigits
onezerodigits / stream.py
Last active April 25, 2018 12:42
Stream Raspberry Pi camera locally at ADDRESS_OF_PI:8000
import io
import picamera
import logging
import socketserver
from threading import Condition
from http import server
PAGE="""\
<html>
<head>
@onezerodigits
onezerodigits / Install AVCONF
Last active April 30, 2018 23:39
Raspberry Pi Stream to Twitch
sudo apt-get update
sudo apt-get install libav-tools
@onezerodigits
onezerodigits / showsover
Created April 24, 2018 23:35
End the Raspberry Pi video stream
#!/bin/bash
sudo pkill -f "raspivid"
sudo pkill -f "avconv"