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 / unix-commands.md
Created March 6, 2014 22:17
A list of unix commands
  • column: create columns from text input
  • tr: translate/substitute/delete input
  • join: like a database join but for text
  • comm: file comparison like a db join
  • paste: put lines in a file next to each other
  • rs: reshape arrays
  • jot: generate data
  • expand: replace spaces and/or tabs
  • time: track time and resourcing
  • watch: execute something on a schedule in realtime
@jppommet
jppommet / random-line-file.sh
Last active August 29, 2015 14:01
Pick a random line from a file
cat $FILE | sort --random-sort | head -n 1
# alternatively
rl -c 1 -n src/main/resources/and-feb10.csv
@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/
@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 / 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 / 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 / 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>
// 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 / 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: