Skip to content

Instantly share code, notes, and snippets.

@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@pfdevmuller
pfdevmuller / pom.xml
Created March 12, 2015 20:25
Corrected version of minimal Mindstorms EV3 Lejos pom from https://lejosev3.wordpress.com/2013/11/07/run-and-debug-java-code-with-eclipse/
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MavenRobot</groupId>
<artifactId>MavenRobot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>MavenRobot</name>
<description>This is an example maven project to run Java code one the EV3 brick</description>
<properties>
@wchargin
wchargin / words
Created February 11, 2014 01:14
/usr/share/dict/words
This file has been truncated, but you can view the full file.
A
A's
AA's
AB's
ABM's
AC's
ACTH's
AI's
AIDS's
AM's
@wandernauta
wandernauta / sp
Last active April 16, 2024 15:37
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@cosimo
cosimo / parse-options.sh
Created September 21, 2012 09:31
Example of how to parse options with bash/getopt
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"