Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
jedi4ever / redis_sentinel.sh
Created May 19, 2015 11:52
Redis - Redis Sentinel - Docker
#!/bin/bash
DOCKER_IP=$(ip addr show docker0|grep "inet "|sed -e 's/^[ ]*//g'| cut -d ' ' -f 2| cut -d '/' -f 1)
docker stop redis_0
docker stop redis_1
docker stop sentinel_0
docker stop sentinel_1
docker stop sentinel_2
@jedi4ever
jedi4ever / gist:5d916c1b1c2d767f3f65
Created April 8, 2015 13:10
rsync -> docker exec
Looking for the correct syntax
rsync -avz <host-dir> | docker exec rsync --server --daemon <inside-container-dir>
@jedi4ever
jedi4ever / gist:8da590c05d66ffbdcffb
Last active August 29, 2015 14:18
monkey patch net.connect nodejs to support SRV records
// Proof of concept of monkey patching net.connect to make it support SRV records
// If require a monkey patched connect function before any other requires we can make a generic fix for handling SRV records
// We need of course to handle a few different cases & more robust error handling
// We can require a lib and even specify a filter for which hosts to resolve SRV and which not
var net = require('net');
var dns = require('dns');
// Set a specific Nameserver to be used
dns.setServers(['172.17.42.1']);
@jedi4ever
jedi4ever / gist:c910b487f515a07a488c
Created March 30, 2015 10:02
coreos cloudinit for etcd/fleet/consul/registrator/ambassador
#cloud-config
write_files:
- path: /etc/systemd/system/docker.service.d/increase-ulimit.conf
owner: core:core
permissions: 0644
content: |
[Service]
LimitMEMLOCK=infinity
- path: /etc/ntp.conf
@jedi4ever
jedi4ever / feedback.md
Created December 1, 2014 18:50
release engineering - devops definitions

I was asked to get some feedback on the following definition:

Dear Mr. Debois,

I would like to ask you for some feedback on the following definition drafts for the terms release engineering and DevOps.

Here, at RWTH Aachen University in Germany, we try to find definitions for those terms as part of a seminar in software engineering. Moreover, >in my work, I try to point out the differences between release

@jedi4ever
jedi4ever / gist:7677d62f1414c28a1a8c
Last active November 20, 2020 07:28
Some notes on travisci remote debugging via ssh or screenshot or remote desktop of Mac VM builds
Some notes on remote debugging mac builds on Travisci. It's hard to tell when something hangs what the cause it. Trial and error via commits is tedious. And on Mac , sometimes it's the gui asking for input. So I worked my around to get the access I needed for faster debugging a build.
#################################################
# Enable remote ssh access to travisci build for debugging
#################################################
# Add a key so we can login to travisci vm
- cat ssh/travisci.pub >> ~/.ssh/authorized_keys
- chmod 600 ssh/travisci
# Install netcat
http://testflightapp.com/install/0ad4aa4dee1873848fd900cb9bc14d61-MTMyMTk5Mjk/
@jedi4ever
jedi4ever / README.md
Last active January 2, 2016 14:18
Notes on auto crashlytics and cordova integration

After adding crashlytics code (crashlytics.sh) & Patching the xcodeproject file (crashlytics.rb)

  • It will work in xcode but not in cordova anymore.

  • This is because xcoder writes the .xcodeproj file in a format that node-xcode doesn't understand.

  • you need to 'beautify/sanitize' the file again.

    • brew install xcproj
    • and run xcproj -P <path to your xcodeproj file> touch
  • now you are ready to go in cordova

@jedi4ever
jedi4ever / upload-to-appstore.sh
Created August 18, 2014 12:13
Command upload App/Ipa to the iTunes Connect App Store
#!/bin/bash
set -ex
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status
# Requires application loader to be installed
# See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html
# Itunes Connect username & password
USER=bla
@jedi4ever
jedi4ever / README.md
Created March 18, 2014 07:43
Nodejs & Versioning etc.. in Continous Delivery

Current setup

  • npm install from public repo
  • use of github URLs for private dependencies:
    • PRO: easy to use, using #master always fetches latests
    • BAD: npm install downloads every time, need to npm link or rm -rf node_modules to make sure
  • rebuild of consolidated/minified files every time, using Git version
    • BAD: results in consistent build overwriting
    • IMPROVE: using hash of result and upload to cloudfront

Improved flow: