LOCATION=$(curl -s https://api.github.com/repos/<YOUR ORGANIZTION>/<YOUR REPO>/releases/latest \
| grep "zipball_url" \
| awk '{ print $2 }' \
| sed 's/,$//' \
| sed 's/"//g' ) \
; curl -L -o <OUTPUT FILE NAME> $LOCATIONfor example:
| # any images you use later, add them here first to create aliases | |
| # I like keeping all my versions at the top | |
| FROM node:14.3-slim as node | |
| FROM php:7.2.1-fpm-slim as php | |
| FROM nginx:1.17 as nginx | |
| # The real base image to start from | |
| FROM ubuntu:focal-20210827 as base | |
| # install apt stuff |
| const apiUrl = "http://api.quotable.io/random?tags="; | |
| async function start() { | |
| var quote; | |
| var cite; | |
| const response = await fetch(apiUrl); | |
| const data = await response.json(); | |
| if (response.ok) { | |
| // Update DOM elements |
LOCATION=$(curl -s https://api.github.com/repos/<YOUR ORGANIZTION>/<YOUR REPO>/releases/latest \
| grep "zipball_url" \
| awk '{ print $2 }' \
| sed 's/,$//' \
| sed 's/"//g' ) \
; curl -L -o <OUTPUT FILE NAME> $LOCATIONfor example:
curl to get the JSON response for the latest releasegrep to find the line containing file URLcut and tr to extract the URLwget to download itcurl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \| #!/bin/bash -e | |
| echo ' | |
| PATH=$HOME/go/bin:$PATH | |
| export GOPATH=$HOME | |
| export CDPATH=.:$HOME/src/golang.org/x:$HOME/go/src:$HOME/src/github.com:$HOME/src/github.com/nf:$HOME/src/github.com/adg | |
| export EDITOR=vim | |
| ' >> ~/.profile | |
| sudo apt-get update |
Note: These are rough notes and there may be some variance as versions of raspbian get updated but should be pretty reliable as a guide.
This gist provides some instructions and config in order to have your Raspberry PI automatically connect to a roamed network, however if it fails to discover an available network it will set itself up as a wireless access point for you to connect to.
| from __future__ import with_statement | |
| from fabric.api import local, lcd | |
| # Usage: | |
| # fab connect - mounts /home/pi/<pi_dir> so it's available locally at <workspace><remote> | |
| # fab disconnect - unmount | |
| # | |
| # Note this is Mac specific - Linux distributions use fusermount -u instead of umount | |
| # Requires OSXFUSE and SSHFS from http://osxfuse.github.io/ |
| - name: Install PPA for latest nodejs version | |
| apt_repository: repo=ppa:chris-lea/node.js state=present | |
| tags: install_nodejs_ppa | |
| - name: Install Nodejs package | |
| apt: pkg=nodejs state=latest update_cache=yes | |
| tags: install_nodejs | |
| - name: Install global tools | |
| command: npm install {{ item }} -g |
| #!/usr/bin/env python | |
| import tweepy | |
| from BeautifulSoup import BeautifulSoup as parser | |
| import urllib | |
| import sys | |
| import argparse | |
| import ConfigParser |
| // Steve Phillips / elimisteve | |
| // 2013.01.03 | |
| // Programming Challenge: Launch 4 threads, goroutines, coroutines, or whatever your language uses for concurrency, | |
| // in addition to the main thread. In the first 3, add numbers together (see sample code below) and pass the results | |
| // to the 4th thread. That 4th thread should receive the 3 results, add the numbers together, format the results as | |
| // a string (see sample code), and pass the result back to `main` to be printed. | |
| // | |
| // Do this as succinctly and readably as possible. _Go!_ #golang #programming #concurrency #challenge | |
| package main |