Skip to content

Instantly share code, notes, and snippets.

View jppommet's full-sized avatar
🏠
Working from home

Jean-Pierre Pommet jppommet

🏠
Working from home
View GitHub Profile
@jppommet
jppommet / lambda-concurrent.sh
Created June 17, 2017 23:05 — forked from smithclay/lambda-concurrent.sh
Concurrently execute a lambda function for warming purposes
#!/bin/bash
# This attempts to concurrently execute an AWS Lambda function. WIP.
# After execution, roughly NUM_EXECUTION containers will be ready
# to accept requests.
# More advanced strategies are out there. Check out @lambdacult on twitter, for example.
AWS_LAMBDA_FUNCTION_NAME=LambdaInfo
NUM_EXECUTIONS=3
@jppommet
jppommet / yo-generators-setup.md
Created February 17, 2014 21:29
List of yeoman generators that are very useful to scaffold front-end boilerplate code

Intro

Below a list of yeoman tools, generators that are very useful to scaffold front-end boilerplate code.

Also It can be very helpful in adding them into a docker container and share.

Generators

Envcheck makes sure that everything is installed properly in order to run yeoman smoothly

$ npm install -g envcheck
@jppommet
jppommet / osx_homebrew_docker.sh
Created January 17, 2016 10:19
Install Docker via Homebrew
#!/bin/sh
# Install the Docker toolbox via Homebrew.
brew install cask dockertoolbox
# Create VM that Docker will run in.
# Replace "virtualbox" with another driver if desired...
docker-machine create --driver=virtualbox docker-vbox
# To remove your newly created VM:
@jppommet
jppommet / caddy_server_init.sh
Created December 22, 2016 07:45
Caddy Server System V init script
#!/bin/bash
# Caddy daemon
# chkconfig: 345 20 80
# description: Caddy daemon
# processname: caddy
DAEMON_PATH="/usr/local/bin"
DAEMON='./caddy'
DAEMONOPTS="-conf=/etc/caddy/Caddyfile -log /var/log/caddy.log"
@jppommet
jppommet / _service.md
Last active October 17, 2016 07:51 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@jppommet
jppommet / run_mysql56.sh
Created August 16, 2016 17:51
Run MySQL 5.6 locally by skipping mysql.users lookup (w/ previous MySQL 5.7 installation)
$ mysqld_safe --bind-address=127.0.0.1 --data-dir=/usr/local/var/mysql --skip-grant-tables --user=root

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

@jppommet
jppommet / snsToSlack.js
Created June 13, 2016 23:26 — forked from terranware/snsToSlack.js
AWS Lambda function to Slack Channel hookup
var https = require('https');
var util = require('util');
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
var postData = {
"channel": "#aws-sns",
"username": "AWS SNS via Lamda :: DevQa Cloud",
@jppommet
jppommet / drone_local_setup.md
Last active January 18, 2016 09:01
Drone.io Local Setup

Grab docker image from DockerHub and install into your docker machine environment docker pull drone/drone:0.4 mkdir -p /usr/local/etc/drone/dronerc

Edit your file dronerc

REMOTE_DRIVER=github
REMOTE_CONFIG=https://github.com?client_id=${client_id}&client_secret=${client_secret}
@jppommet
jppommet / dart-ubuntu-13.10-issues
Created December 13, 2013 18:41
Dart Editor Issues on Linux Ubuntu 13.10
1. Menu do not display
* Type : $ nano .local/share/applications/dart_editor.desktop
* Make sure you have the following lines in this file :
Icon=<your_path>/dart/icon.xpm
Path=<your_path>/dart
Exec=env UBUNTU_MENUPROXY= <your_path>/dart/DartEditor (!! space character important here !!)
2. Dartium can not be open b/c libudev.so.0 was not found