Skip to content

Instantly share code, notes, and snippets.

View johnantoni's full-sized avatar

John Griffiths johnantoni

View GitHub Profile
@johnantoni
johnantoni / raspberry-pi.printer.md
Created January 12, 2014 19:53
raspberry pi printer server with cups
sudo apt-get -y install cups

sudo usermod -a -G lpadmin pi

sudo nano /etc/cups/cupsd.conf

comment out: Listen localhost:631

and replace with: Port 631

@johnantoni
johnantoni / raspberry-pi.wifi.md
Created January 12, 2014 19:46
raspberry pi setup wifi

edit network interface

sudo nano /etc/network/interfaces

as:

auto lo
iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0

@johnantoni
johnantoni / startup_mailer.py
Created December 31, 2013 16:21
raspberry pi - send email on startup (will need gmail account to send from)
import subprocess
import smtplib
import socket
from email.mime.text import MIMEText
import datetime
# Change to your own account information
to = '[email protected]'
gmail_user = '[email protected]'
gmail_password = 'yourpassword'
smtpserver = smtplib.SMTP('smtp.gmail.com', 587)
@johnantoni
johnantoni / btsync.config
Created December 30, 2013 18:21
btsync.config
{
"device_name": "box-name",
"listening_port" : 0, // 0 - randomize port
/* storage_path dir contains auxilliary app files
if no storage_path field: .sync dir created in the directory
where binary is located.
otherwise user-defined directory will be used
*/
"storage_path" : "/home/share/.sync",

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@cythux
cythux / Pure-CSS-Pythagoras-tree.markdown
Created December 30, 2013 16:01
A Pen by Scott Kellum.

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, 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.

@LeaVerou
LeaVerou / dabblet.css
Created November 23, 2013 14:34
(C)Leanest CSS spinner ever
/**
* (C)Leanest CSS spinner ever
*/
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;
@LeaVerou
LeaVerou / dabblet.css
Created November 9, 2013 16:43
Flexible Google-style progress indicator
/**
* Flexible Google-style progress indicator
*/
@keyframes progress {
50% { border-width: .5em 0; }
to { border-width: .5em 0 0 0; }
}
@keyframes rotate {
@plentz
plentz / nginx.conf
Last active April 24, 2025 04:39
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048