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 / 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 / app.py
Created June 7, 2016 20:32
youtube-dl wrapper for AWS Lambda
from __future__ import unicode_literals
from youtube_dl import YoutubeDL
import boto3
import os
class Logger(object):
def debug(self, msg):
pass
@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 / 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:
// by Erik Wrenholt
import java.util.*;
class Mandelbrot
{
static int BAILOUT = 16;
static int MAX_ITERATIONS = 1000;
private static int iterate(float x, float y)
{
@jppommet
jppommet / debugfs-inode.txt
Created July 25, 2014 15:09
Debug Info a file/directory via inode number
[sudo] debugfs -R 'stat <inode>' /dev/<device_name>
@jppommet
jppommet / nvidia-driver-linux.txt
Last active August 29, 2015 14:04
official nvidia drivers running on linux
Check that your official nvidia driver is running properly on linux :
lspci -vnn | grep -i VGA -A 12
glxinfo | grep OpenGL | grep renderer
grep 'nouveau' /etc/modprobe.d/* | grep nvidia
lsmod | grep nvidia
modprobe -R nvidia
modinfo nvidia_<N>
@jppommet
jppommet / git-alias.ini
Created July 23, 2014 20:28
useful git aliases
[alias]
amend = commit --amend -a
br = branch
co = checkout
ds = diff --staged
di = diff
fetchall = fetch -v --all
log-fancy = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
# With git >= 1.8.3 you can use %C(auto) for the branch decorator (%d)
log-fancy = log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
@jppommet
jppommet / bcm4352-wifi-ac.md
Created July 4, 2014 20:03
Linux Ubuntu Drivers for Broadcom Chipset BCM4352 802.11ac Wireless Network Adapter [14e4:43b1]
@jppommet
jppommet / cli_dup_line_file.txt
Created June 11, 2014 18:49
cli : print duplicated line from a file
$ uniq -d <file>
or
$ uniq -D <file>
Reference Link : http://www.thegeekstuff.com/2013/05/uniq-command-examples/