Skip to content

Instantly share code, notes, and snippets.

View payne's full-sized avatar

Matt Payne payne

View GitHub Profile
@payne
payne / gist:b3afa5848d04f15b607ab99958aac79e
Created July 20, 2023 20:03
docker compose only accept connection requests from 127.0.0.1
version: '3.8'
services:
redis-stack:
image: redis/redis-stack:latest
# https://stackoverflow.com/questions/45109398/how-can-i-make-docker-compose-bind-the-containers-only-on-defined-network-instea
# This techinque makes it so http://R.MattPayne.org:8001 fails on the Internet
# But after `ssh R.MattPayne.org -L 8001:127.0.0.1:8001`
# http://127.0.0.1:8001/ works great :-)
ports:
- "127.0.0.1:6379:6379"
@payne
payne / docker-compose.yml
Created January 31, 2023 00:03 — forked from thomasdarimont/docker-compose.yml
Docker OpenLDAP + phpldapadmin example
version: '2'
services:
openldap:
image: osixia/openldap:1.2.3
container_name: openldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "Example Inc."
LDAP_DOMAIN: "example.org"
LDAP_BASE_DN: ""
@payne
payne / The Coding Train.md
Created August 7, 2022 22:23 — forked from yunga/The Coding Train.md
Playlists and videos from The Coding Train youtube channel
@payne
payne / mock_requests.py
Created May 18, 2021 02:54 — forked from evansde77/mock_requests.py
Example of mocking requests calls
#!/usr/bin/env python
"""
mocking requests calls
"""
import mock
import unittest
import requests
from requests.exceptions import HTTPError
@payne
payne / pixelbook-dev-setup.md
Created April 13, 2021 00:16 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@payne
payne / gist:839a7d83b19cc5d77f80aef2f3810a14
Created March 10, 2021 03:14 — forked from jhannah/gist:9541cadd3081ddd1d8ba146173d0775a
Google Civic Information API example
A random house I chose from Google Maps:
4215 S 28th St, Omaha, NE 68107
https://developers.google.com/civic-information/docs/v2/representatives/representativeInfoByAddress?apix_params=%7B%22address%22%3A%224215%20S%2028th%20St%2C%20Omaha%2C%20NE%2068107%22%7D
Here's a collapsible tool of this same data: https://jsoneditoronline.org/#left=cloud.fc62383d0a2d4d8d9fcc8a8cc1f54d06
{
"normalizedInput": {
"line1": "4215 South 28th Street",
@payne
payne / clmystery.sh
Created February 18, 2021 21:47 — forked from apettenati/clmystery.sh
Command Line Mystery
# Note: I use ripgrep (rg) to search which searches recursively and supports regex -A and -B return rows after/before search results
git clone https://github.com/veltman/clmystery
cd clmystery
cat instructions
cd mystery
# Search for clues and save to file
cat crimescene | rg CLUE > clues.txt
# Search for Annabel in people
rg Annabel people
@payne
payne / jon-roam-daily-template.md
Created June 30, 2020 17:04 — forked from jborichevskiy/jon-roam-daily-template.md
The daily template I use for Roam Research https://roamresearch.com/
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • What's one thing top of mind today?
    • What's the one thing I need to get done today to make progress?
    • Review #[[Index: Questions]] #values
  • Agenda
    • {{[[TODO]]}} Morning walk #goal-health #habit
    • {{[[TODO]]}} Check calendar for scheduled events
  • {{[[TODO]]}} Morning focus hour
@payne
payne / Podcasts.md
Created September 19, 2019 14:53
Some Podcasts I like

These are numbered but not ordered.

  1. https://syntax.fm/ wonderfly done about front end development
  2. https://www.bbc.co.uk/programmes/w13xttx2 about mankind going to the moon
  3. askamanager.org -- Management
  4. https://www.orbit.fm/bookbytes/28 -- A book club for developers
  5. https://www.greaterthancode.com -- Human side of technology with a whole lot great tech info and people info
  6. https://www.wbur.org/kindworld -- Kindness helps
  7. https://soundcloud.com/user-98066669 Privacy & Security podcast -- very scarey
  8. https://99percentinvisible.org/ - Heartwarming podcast about everything
@payne
payne / JavaScriptFun.md
Last active May 2, 2019 03:29
Some JavaScript things

Game examples

  1. Opensource game development kit that teaches how to make a breakout game. http://end3r.github.io/Gamedev-Canvas-Content-Kit/
  2. https://nscoders1.github.io/pong/game.html by Marc-André Cournoyer
  3. Space Invaders by Mary Rose Cook a. http://annotated-code.maryrosecook.com/space-invaders/index.html is the game and the source code b. https://vimeo.com/105955605 video of Mary live coding the game in 30 minutes
  4. https://repl.it/@payne/mini-asteroids-1 is the simple click to add a pokemon character example I mentioned. Might be used as a basis for a game.

Books

  1. http://jsforcats.com/