Skip to content

Instantly share code, notes, and snippets.

View sseidenthal's full-sized avatar

Steve Seidenthal sseidenthal

  • Luxembourg, Germany
View GitHub Profile
@sseidenthal
sseidenthal / s3_download.sh
Last active May 23, 2019 05:22
bash script to retrieve files from aws s3 (or compatible) object store
#!/bin/bash
AWS_PROFILE='default' # profile name as defined in your aws config
AWS_BUCKET='' # name of the bucket you want to retrieve data from
AWS_OPTIONS_STRING='' # options you might need to add to the query
AWS_PAGE_SIZE=100
AWS_MAX_ITEMS=100
AWS_LIST_COMMAND="/usr/bin/aws --profile ${AWS_PROFILE} s3api list-objects --bucket=${AWS_BUCKET} --page-size ${AWS_PAGE_SIZE} --max-items=${AWS_MAX_ITEMS} $AWS_OPTIONS_STRING"
AWS_DOWNLOAD_COMMAND="/usr/bin/aws --profile ${AWS_PROFILE} s3 cp "
DOWNLOAD_PATH='./s3_restore' # path where to put the retrieved files
@sseidenthal
sseidenthal / pcc.json
Created July 31, 2018 17:53
example database for json-server
{
"tenants": [
{ "id": 1, "name": "Anectotolis SA"},
{ "id": 2, "name": "OOTP Management"}
],
"datasources": [
{
"id": 11,
"tenantId": 1,
"alias": "Anectotolis SA - HUHU",
@sseidenthal
sseidenthal / gist:e9653685323984ed6814c7eccb8ee8ba
Created June 14, 2018 17:10
echange super_key with control_key on Linux
#to test please create a file such as ./~xmodmaprc
#then run xmodmap ./~xmodmaprc
#if it works for you make it permanent
clear control
clear mod4
keycode 105 =
keycode 206 =
var national = ["Join", "mobilePOST", "Tango GSM", "National", "SMSPremium"];
var voicemail = ["IVR", "Tango VM", "mobPOST VM"];
/* ============================================================================================================================================ */
var match = { $match :
{"SERVICE_TYPE" : {"$in" : [1,2,3,4] } }
};
/* ============================================================================================================================================ */
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: hello-world-deployment
spec:
selector:
matchLabels:
app: hello-world
replicas: 3
template:
#inspired by http://blog.wescale.fr/2017/09/04/kubernetes-utiliser-traefik-comme-loadbalancer/
---
apiVersion: v1
kind: Namespace
metadata:
name: traefik
---
kind: ClusterRole
@sseidenthal
sseidenthal / tmux.conf
Created February 11, 2018 15:07
this is the beginning of my custom tmux.com
# Use Vim shortcuts
setw -g mode-keys vi
# Make `Ctrl+B R` reload the config file
unbind r
bind r source-file ~/.tmux.conf
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-sensible'
@sseidenthal
sseidenthal / tests.php
Last active September 4, 2018 06:09
Interview Tests, fizzBuzz Example
<?php
/**
* Class Tests
*
* This are solutions to Interview Tests
*/
class Tests {
/**
* @param $n
*/
@sseidenthal
sseidenthal / gist:2db2ff121f461f7e254b8d0ca5160adb
Last active November 12, 2017 13:46
unison-sync-status.1s.sh
#!/bin/bash
#
# <bitbar.title>Unison Sync Status</bitbar.title>
# <bitbar.version>v0.1</bitbar.version>
# <bitbar.author>Steve Seidenthal</bitbar.author>
# <bitbar.author.github>sseidenthal</bitbar.author.github>
# <bitbar.image></bitbar.image>
# <bitbar.desc></bitbar.desc>
# <bitbar.dependencies>unison</bitbar.dependencies>
#
@sseidenthal
sseidenthal / entrypoint.sh
Created August 1, 2017 05:51
This is a custom entrypoint for an php:7.1-apache image, it might work in a similar way with other base images but it has not been tested what it does # - it parses a parameters file *CONFIG_FILE* of your project an looks for variable placeholders # - it checks if any _FILE appended environment variables exist, if so it puts the content of the f…
#!/bin/bash
# Maintainer Steve Seidenthal <[email protected]>
#
# This is a custom entrypoint for an php:7.1-apache image, it might work in a similar way with other base images but it
# has not been tested
#
# what it does
# - it parses a parameters file *CONFIG_FILE* of your project an looks for variable placeholders
# - it checks if any _FILE appended environment variables exist, if so it puts the content of the file in the variable
# - it makes sure all needed variables (as defined in CONFIG_FILE) exist