Skip to content

Instantly share code, notes, and snippets.

View ubarbaxor's full-sized avatar
🎯
Focusing

ubarbaxor

🎯
Focusing
View GitHub Profile
(() => {
if(!navigator.mediaDevices) {
navigator.mediaDevices = {}
}
if (!navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia = (
navigator.mediaDevices.webkitGetUserMedia ||
navigator.mediaDevices.mozGetUserMedia ||
navigator.mediaDevices.msGetUserMedia ||
@Raphy42
Raphy42 / shadok.js
Created July 18, 2017 17:07
Base 10 to shadok converter
const shadok = n => parseInt(n)
.toString(4)
.split('')
.map(e => ['ga', 'bu', 'zo', 'meu'][e])
.join(' ')
@daqing
daqing / docker-ce-ubuntu-install.sh
Created March 23, 2017 08:43
Install Docker-CE on ubuntu
sudo apt update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
@jpillora
jpillora / s3get.sh
Last active August 23, 2023 12:07
S3 signed GET in plain bash (Requires openssl and curl)
#!/bin/bash
#set these in your environment/profile (NOT HERE)
AWS_ACCESS_KEY=""
AWS_SECRET_KEY=""
function s3get {
#helper functions
function fail { echo "$1" > /dev/stderr; exit 1; }
#dependency check
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm