Skip to content

Instantly share code, notes, and snippets.

View samyranavela's full-sized avatar

Samy RANAVELA samyranavela

  • Soustons, France
View GitHub Profile
@samyranavela
samyranavela / file_size.sh
Created December 29, 2014 18:06
Taille total des fichiers > 5MB
#!/bin/sh
find ./ -type f -size +5120 -exec du -shc {} +
@samyranavela
samyranavela / findame.sh
Created December 31, 2014 23:45
Shortcut to find files with ease.
#!/bin/sh
# http://www.commandlinefu.com/commands/view/13949/shortcut-to-find-files-with-ease.
findame(){ find . -iname "*$1*"; }
@samyranavela
samyranavela / psg.sh
Created December 31, 2014 23:46
Shortcut to search a process by name
#!/bin/sh
# http://www.commandlinefu.com/commands/view/13947/shortcut-to-search-a-process-by-name
psg(){ ps aux | grep -v grep | egrep -e "$1|USER"; }
@samyranavela
samyranavela / start-stop-daemon-template
Created April 25, 2016 09:35 — forked from bcap/start-stop-daemon-template
Template file for creating linux services out of executables using the start-stop-daemon
#!/bin/bash
### BEGIN INIT INFO
# Provides: <service name>
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <service description>
### END INIT INFO
@samyranavela
samyranavela / gist:d0e70c2c3c603603edc11e54735beddb
Created June 10, 2016 07:33 — forked from archgrove/gist:6766129
Replays a git history, passing the repository at each state to a given script
#!/bin/bash
# Takes a repository and script from the command line
# and executes the script for each git log entry in reverse chronological order
# Use temporary files of the following format
TMP_TEMPLATE="/tmp/gitreplay-XXXXXXXX"
# Validate command line parameters
if [ -z $1 -o -z $2 ]; then
@samyranavela
samyranavela / traefik.sh
Created November 9, 2016 13:47
Start a traefik container & connect to all network
#!/bin/sh
#set -ex
# The daemon's name (to ensure uniqueness and for stop, restart and status)
name="traefik"
# The path of the client executable
command="$HOME/traefik/traefik.sh"
# Any command line arguments for the client executable
command_args=""
# The path of the daemon executable
@samyranavela
samyranavela / command_exists.sh
Created September 21, 2017 14:19 — forked from gubatron/command_exists.sh
check if command exists (linux, mac)
function command_exists {
#this should be a very portable way of checking if something is on the path
#usage: "if command_exists foo; then echo it exists; fi"
type "$1" &> /dev/null
}
@samyranavela
samyranavela / build_pcntl.sh
Last active April 29, 2019 05:57 — forked from jbanety/build_pcntl.sh
Build PCNTL ext for MAMP PHP 7.1.8
#!/usr/bin/env bash
set -xo pipefail
# Command lines tools
xcode-select --install
# Install dependencies
brew install wget autoconf openssl libjpeg libpng lzlib curl imap-uw readline postgresql libxml2 mcrypt gettext libxslt homebrew/dupes/libiconv icu4c expat bison webp freetype
@samyranavela
samyranavela / ddd_cqrs_event-sourcing_in_php.md
Created October 12, 2017 09:51 — forked from jsor/ddd_cqrs_event-sourcing_in_php.md
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@samyranavela
samyranavela / .babelrc
Created November 9, 2017 12:28 — forked from andrewmunro/.babelrc
Sequelize cli with ES6
{
"presets": ["es2015"],
"plugins": [
"add-module-exports"
],
}