Skip to content

Instantly share code, notes, and snippets.

View cedced19's full-sized avatar

Cédric JUNG cedced19

View GitHub Profile
@cedced19
cedced19 / 404.html
Last active June 18, 2016 10:05
Configuration of Nginx in /etc/nginx/sites-enabled
<!DOCTYPE html><html><head><meta charset="utf-8"><title>Cédric | 404</title><link href="/favicon.ico" rel="shortcut icon" type="image/x-icon"><style type="text/css">html{font-size:200%;font-family:futura-pt,sans-serif;line-height:1.5em;text-align:center}body{background-color:#34495e;color:#ecf0f1;margin:0 auto;height:100%}::selection{color:#34495e;background-color:#ecf0f1}</style></head><body><h1>Not found !</h1></body></html>
@cedced19
cedced19 / .travis.yml
Created March 15, 2015 09:22
Travis CI configuration.
language: node_js
node_js:
- "0.10"
- "0.12"
- "iojs"
@cedced19
cedced19 / button.css
Last active August 29, 2015 14:18
A button
.btn {
text-transform: uppercase;
line-height: 40px;
margin: 5px;
background-color: transparent;
background-color: rgba(243, 156, 18, 0);
border: 2px solid #C8C8C8;
border-radius: 3px;
cursor: pointer;
-moz-transition-duration: 0.3s;
@cedced19
cedced19 / gamepad.js
Last active August 29, 2015 14:20
Catch event on a gamepad
var gamepad = require('gamepad'),
colors = require('colors'),
app = new hapi.Server();
gamepad.init();
// List the state of all currently attached devices
for (var i = 0, l = gamepad.numDevices(); i < l; i++) {
console.log(i, gamepad.deviceAtIndex());
}
@cedced19
cedced19 / harddrive.md
Created May 30, 2015 10:00
A guide to use a harddrive with raspberry pi.

See hardrive connected:

fdisk -l

To mount:

cd /
mkdir harddrive
sudo mount -t auto /dev/sda1 /harddrive
@cedced19
cedced19 / node.md
Last active October 28, 2015 10:25
Install Node.js

Install Node.js (by using nvm)

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
nvm install 0.12

Use Node.js on production

npm update -g pm2
pm2 start 
@cedced19
cedced19 / zsh.md
Last active November 2, 2018 16:37
Install ZSH and Gitster

Install ZSH

cd ~
apt-get install zsh
zsh
chsh # /bin/zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
cd .oh-my-zsh/themes/
nano gitster.zsh-theme
@cedced19
cedced19 / cifs.md
Last active August 29, 2015 14:27
Link your Windows to your Linux

To mount:

  1. Create a linux folder at the root of your Windows' harddrive
  2. Share your folder in Windows
  3. Go to the Linux terminal and write this:
cd /www && mkdir win && mount -t cifs //192.168.0.47/linux /www/win -o username=cedced19@live.fr,password=mypassword,dir_mode=0777,file_mode=0777,uid=1000,gid=100

To unmount:

@cedced19
cedced19 / git-io.md
Last active October 21, 2015 14:16
A list of my "git.io" link
@cedced19
cedced19 / root-pi.md
Created October 20, 2015 13:01
Get root user privileges

Update root password:

sudo passwd root

Search for PermitRootLogin and change it to yes:

sudo nano /etc/ssh/sshd_config