Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Achilleas Pipinellis axilleas

🏠
Working from home
View GitHub Profile
@axilleas
axilleas / archgitlab.sh
Last active Mar 29, 2021
Install GitLab 5.0 on Archlinux
View archgitlab.sh
#!/bin/bash
##########################
## Check if run as root ##
##########################
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@axilleas
axilleas / reset.md
Created Mar 18, 2021 — forked from hitautodestruct/reset.md
Reset root password on scaleway.com
View reset.md
@axilleas
axilleas / coordinate.py
Created Mar 30, 2013
Edx - 6.00x Lecture 10 Problem 7
View coordinate.py
class Coordinate(object):
def __init__(self,x,y):
self.x = x
self.y = y
def getX(self):
# Getter method for a Coordinate object's x coordinate.
# Getter methods are better practice than just accessing an attribute directly
return self.x
@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:

View keybase.md

Keybase proof

I hereby claim:

  • I am axilleas on github.
  • I am axil (https://keybase.io/axil) on keybase.
  • I have a public key ASDBdLEYIKRI_WjBtF-KXqDyx7JQgnRHCKVGtU2d16hlCwo

To claim this, I am signing this object:

@axilleas
axilleas / perm.rb
Last active Feb 16, 2018
Permutations of a string
View perm.rb
#!/usr/bin/env ruby
# Recursive method, print all strings permutations with length = str.length.
# Iterrate over each character of given string and recursively call
# string_permutations. Each time, a letter from str is stripped and added to elmt.
# When str.length reaches zero, print elmt.
def string_permutations(str, elmt='')
if str.length == 0
p [elmt]
else
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:
@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
@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