Skip to content

Instantly share code, notes, and snippets.

View hmedkouri's full-sized avatar
💯

Hicham Medkouri hmedkouri

💯
  • London
View GitHub Profile
@hmedkouri
hmedkouri / recur-git-cmd.sh
Last active October 9, 2019 08:49
Execute git command on all subdirectories - useful for git repos
#!/bin/sh
# store the command and its paramters
CMD="$@"
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo -e "\n\033[1mExecuting \033[0;32m'$CMD'\033[0m\033[1m against all repositories under $CUR_DIR ...\033[0m\n"
@hmedkouri
hmedkouri / l2tp-ipsec.md
Last active December 15, 2022 21:56
VPN: L2TP over IPSec on Linux Mint
  • Necessary libraries (all available in the standard distribution) - mark them for installation in Synaptic Package Manager Core packages that bring the necessary dependencies(start here) network-manager-l2tp-gnome (1.2.4-0ubuntu1xenial1) strongswan (5.3.5-1ubuntu3.1) strongswan-plugin-openssl (5.3.5-1ubuntu3.1) All packages (after selecting list 1, make sure you have all these "Marked for Installation") that need to be installed network-manager-l2tp (1.2.4-0ubuntu1xenial1) network-manager-l2tp-gnome (1.2.4-0ubuntu1~xenial1) strongswan (5.3.5-1ubuntu3.1) strongswan-libcharon (5.3.5-1ubuntu3.1)
@hmedkouri
hmedkouri / EventBusSpec.groovy
Created June 11, 2018 16:38
Micronaut StackOverflowError when using Guava Eventbus
import com.google.common.eventbus.EventBus
import com.google.common.eventbus.Subscribe
import io.micronaut.context.ApplicationContext
import spock.lang.Specification
import javax.inject.Inject
import javax.inject.Singleton
class EventBusSpec extends Specification {
mvn archetype:generate \
-DinteractiveMode=false \
-DarchetypeGroupId=org.openjdk.jmh \
-DarchetypeArtifactId=jmh-groovy-benchmark-archetype \
-DgroupId=org.sample \
-DartifactId=test \
-Dversion=1.0
@hmedkouri
hmedkouri / recur-git-cmd.sh
Last active April 2, 2018 15:53
zsh script to call a command on all git repositories under the current directory
#!/bin/zsh
# store the command and its paramters
CMD="$@"
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mExecuting \033[0;32m'$CMD'\033[0m\033[1m against all repositories under $CUR_DIR ...\033[0m\n"
@hmedkouri
hmedkouri / update_git_repos.sh
Created April 2, 2018 15:06 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@hmedkouri
hmedkouri / Postman.desktop
Created March 22, 2018 12:52 — forked from aviskase/Postman.desktop
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;