Skip to content

Instantly share code, notes, and snippets.

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 9, 2024 19:52
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@caseyohara
caseyohara / reserved_usernames.rb
Created December 9, 2011 22:58
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@bertrandmartel
bertrandmartel / scantest.cpp
Last active February 22, 2024 14:03
Bluez BLE scanning example (port of https://github.com/carsonmcdonald/bluez-experiments in C++)
// g++ scantest.cpp -lbluetooth
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <iostream>
#include <signal.h>
#include <bluetooth/bluetooth.h>
@pwuertz
pwuertz / kicad_picknplace_assistant.py
Last active November 27, 2023 07:04
KiCad PCB pick and place assistant
Moved to:
https://github.com/pwuertz/kicad_picknplace_assistant
@dschep
dschep / raspbian-python3.6.rst
Last active October 24, 2023 14:57 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).

@EntranceJew
EntranceJew / Get-TweetVid.ps1
Created May 17, 2017 20:33
take a twitter m3u8 link and download it properly
# take a twitter m3u8 link and download it properly
function Get-TweetVid {
param( [string]$Uri, [string]$OutDir )
$out_file = (Split-Path $Uri -Leaf).Replace(".m3u8", ".mp4")
$out_path = Join-Path $OutDir $out_file
if( -Not (Test-Path $out_path) ){
mkdir -Path $out_path
}
ffmpeg -i $Uri -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $out_path
}
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@bd2357
bd2357 / CeedlingWinNotes.txt
Last active April 30, 2023 19:07
Ceedling on Windows notes
Using Ceedling on Windows is a bit more involved than using it in a Linux
environment. It requires Ruby which is not often installed on windows machines,
and while Ceedling can be configures to run with most C compilers, out of the
box it tries to use GCC which is also not generally available on windows.
Now if you are running Windows 10 professional, you can install the bash shell
and things get easier but lets say you are stuck with Windows Home or Windows 7
and you want to do some quick and dirty test driven C coding with simple Mocks,
what is the best way to proceed?
Well it turns out that installing Ruby via the RubyInstaller for Windows
@AdaRoseCannon
AdaRoseCannon / HTMLElementPlus.js
Last active March 3, 2023 11:33
HTML Element Plus for Web Components
'use strict';
class HTMLElementPlus extends HTMLElement {
static defaultAttributeValue() {
/* the name of the attribute is parsed in as a parameter */
return;
}
static parseAttributeValue(name, value) {