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 / 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 / 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 / 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 / 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
@jppommet
jppommet / lsb_release
Created November 5, 2013 15:08
Alternative uname -a, didn't know there was such a command line lol :)
$ lsb_release -a
@jppommet
jppommet / nodejs-force-gc
Created October 28, 2013 21:06
Force node.js garbage collection
# cli
$ node --expose-gc test.js
# in .js source code
global.gc()
@jppommet
jppommet / ubuntu13.10-last-nvidia-drivers
Last active December 26, 2015 12:18
Install NVIDIA Drivers Last Stable Release (long-lived branch) for Ubuntu 13.10
1. Since we are using NVIDIA driver, we need to remove or disable XServer Nouveau Drivers
* Disable :
** sudo nano /etc/modprobe.d/blacklist-nouveau.conf
** Add the following two lines :
blacklist nouveau
options nouveau modeset=0
* Remove : sudo apt-get remove xserver-xorg-video-nouveau
2. Stop the display manager : sudo service lightdm stop
3. Install the drivers :
@jppommet
jppommet / py-virtualenv-project-cmds
Last active December 22, 2015 07:59
python virtualenv project shell commands
# init a python project
pip install virtualenv
virtualenv --distribute <venv_dirname>
source <venv_dirname>/bin/activate
# install dependencies
pip install -r requirements.txt
# exit virtualenv mode
deactivate
@jppommet
jppommet / npm-update-S
Created August 4, 2013 21:02
Update all the saved dependencies defined in your package.json. Useful. This command is not documented curiously.
npm update -S