Skip to content

Instantly share code, notes, and snippets.

View Ishidres's full-sized avatar

Ishidres

View GitHub Profile
@samtherussell
samtherussell / api_ref.txt
Last active January 7, 2024 19:34
Logitech SqueezeServer JSONRPC API
Squeezebox API
--------------
This document outlines the JSON RPC interface with a squeezeserver to control and obtain information about squeezeboxes.
JSON : JavaScript Object Notation
RPC : Remote Procedure Call
Uses POST requests sent to:
http://<squeezeserver_address>:9000/jsonrpc.js
@tonkku107
tonkku107 / facts.json
Last active August 6, 2019 13:50 — forked from aetheryx/facts.json
Cat Facts in JSON
[
"A 2007 Gallup poll revealed that both men and women were equally likely to own a cat.",
"A cat almost never meows at another cat, mostly just humans. Cats typically will spit, purr, and hiss at other cats.",
"A cat called Dusty has the known record for the most kittens. She had more than 420 kittens in her lifetime.",
"A cat can jump 5 times as high as it is tall.",
"A cat can jump up to five times its own height in a single bound.",
"A cat can spend five or more hours a day grooming himself.",
"A cat can sprint at about thirty-one miles per hour.",
"A cat can travel at a top speed of approximately 31 mph (49 km) over a short distance.",
"A cat cannot see directly under its nose.",
@FutureSharks
FutureSharks / raspberrypi-picamera-motion-detection.py
Last active October 15, 2023 20:56
A simple example of using the Raspberry Pi Camera Module and python picamera for motion detection
#!/usr/bin/python
import picamera
import cv2
import io
import numpy as np
import imutils
camera = picamera.PiCamera()
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@jaredpalmer
jaredpalmer / tweet.js
Created April 6, 2016 22:45
send-tweet.js
/*
* Code snippet for posting tweets to your own twitter account from node.js.
* You must first create an app through twitter, grab the apps key/secret,
* and generate your access token/secret (should be same page that you get the
* app key/secret).
* Uses oauth package found below:
* https://github.com/ciaranj/node-oauth
* npm install oauth
* For additional usage beyond status updates, refer to twitter api
* https://dev.twitter.com/docs/api/1.1
@jerryalfs
jerryalfs / python 3.4
Created January 31, 2016 09:29
How to close pygame after press x button
from sys import exit
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
#PUT THE FOLLOWING CODE AT THE END OF PYGAME
@developius
developius / README.md
Last active April 25, 2024 22:15
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key: