Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Achilleas Pipinellis axilleas

🏠
Working from home
View GitHub Profile
@axilleas
axilleas / reset.md
Created Mar 18, 2021 — forked from hitautodestruct/reset.md
Reset root password on scaleway.com
View reset.md
@axilleas
axilleas / ddns-start
Created Jul 12, 2020 — forked from kevinxw/ddns-start
Asus-Merlin-DuckDNS
View ddns-start
#!/bin/sh
# register a subdomain at https://www.duckdns.org/ to get your token
# put 'hostname|token' in the 'Host Name' field under DDNS
# e.g. myhost|abcdefgh-1234-5678-9876-f71b0ed7a7fe
DDNS_HOSTNAME_FIELD=$(nvram get ddns_hostname_x)
SUBDOMAIN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F'|' '{print $1}')
TOKEN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F'|' '{print $2}')
IPV4=$(nvram get wan0_ipaddr)
@axilleas
axilleas / portainer-dokku.md
Created May 12, 2018 — forked from woudsma/portainer-dokku.md
TLS secured TCP exposed Docker daemon on Dokku host - setup
View portainer-dokku.md

TLS secured TCP exposed Docker daemon on Dokku host - setup

  1. Create certificates
  2. Edit Docker options
  3. Restart Docker
  4. Copy client certificates from host
  5. (optional) Add remote endpoint in Portainer

Create certificates:

Log into Dokku host as root and create server/client certificates:

@axilleas
axilleas / Advantages.md
Created Aug 30, 2017 — forked from btilford/Advantages.md
Comparison of Git with CVS and Git Overview
View Advantages.md

Git vs. CVS Advantages

Flexible Workflow

In Git your working copy is a clone of the entire repository. This includes branches and tags. This decreases the overhead (speed and manual work) involved when switching contexts and the need to be connected to a network. Some examples are:

  • When switching branches there is no need to connect to a remote server or close your IDE/project and open a checkout in another directory. Running git checkout [branch name] is all you need to do.
  • When merging you do not need a connection to the remote server, you have all branches locally. Since branches are so cheap in Git you could create a new branch to perform the merge in so that if you had a large amount of conflicts you could incrementally work on and commit without affecting the main branch then merge or create a patch after everything has been fixed.
  • Because Git is a distributed system in addition to connecting to a central repository developers can connect to another developers repository. This allows team
@axilleas
axilleas / Rules
Created Mar 29, 2017 — forked from maxim/Rules
Convenient redirects with nanoc
View Rules
#!/usr/bin/env ruby
# ...
preprocess do
RedirectGenerator.generate(config[:redirects], items)
end
route '/old_posts/*' do
item.identifier.sub('old_posts/', '') + 'index.html'
@axilleas
axilleas / semantic-pedantic.md
Created Jul 19, 2016 — forked from jashkenas/semantic-pedantic.md
Why Semantic Versioning Isn't
View semantic-pedantic.md

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@axilleas
axilleas / xvfb
Last active Apr 25, 2016 — forked from nyxcalamity/xvfb
/etc/init.d/xvfb service script
View xvfb
#! /bin/sh
### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop:
### END INIT INFO
@axilleas
axilleas / xvfb
Created Apr 25, 2016 — forked from rsanheim/xvfb
/etc/init.d/xvfb
View xvfb
root@ci:/etc/init.d# cat Xvfb
#! /bin/sh
### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop:
@axilleas
axilleas / Dockerfile
Created Nov 12, 2015 — forked from eluleci/Dockerfile
Dockerfile for Android CI
View Dockerfile
############################################################
# Dockerfile to build Android project and use Jenkins CI
#
############################################################
FROM ubuntu:14.04
MAINTAINER eluleci <emrullahluleci@gmail.com>
RUN apt-get update
View cron_helper.sh
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments: