Skip to content

Instantly share code, notes, and snippets.

View charleslouis's full-sized avatar

okcharlo charleslouis

View GitHub Profile
@charleslouis
charleslouis / Docker-helpers.md
Last active October 23, 2017 03:56
Docker, postgres, sails.js

list containers

docker ps -a

Postgres

  • docker pull postgres
  • docker build -t postgres .

Connect to Postgres

docker exec -it postgres psql -U postgres

@charleslouis
charleslouis / .gitlab-ci-npm.yml
Last active March 13, 2022 22:35
deploy-gitlab-2-linode.md , gitlab, deploy, PROJ_OWNER , DEPLOY_DIR, .gitlab-ci.yml
deploy-prod:
variables:
GIT_STRATEGY: none
stage: deploy
only:
- master
script:
- sudo -u $PROJ_OWNER git --git-dir=$DEPLOY_DIR/.git --work-tree=$DEPLOY_DIR fetch origin $CI_COMMIT_REF_NAME
- sudo -u $PROJ_OWNER git --git-dir=$DEPLOY_DIR/.git --work-tree=$DEPLOY_DIR reset --hard FETCH_HEAD
- sudo -H -u $PROJ_OWNER chmod u+x $DEPLOY_DIR/nodescripts.sh
@charleslouis
charleslouis / sudo dpkg-reconfigure resolvconf
Created October 20, 2016 08:12
sudo dpkg-reconfigure resolvconf
sudo dpkg-reconfigure resolvconf
@charleslouis
charleslouis / nvidia-driver-install-guide ubuntu.md
Last active April 28, 2018 12:07
nvidia-driver-install-guide ubuntu

Ubuntu/Mint Install Nvidia Drivers GTX950-GTX TITAN X 2016

See https://www.youtube.com/watch?v=cVTsemATIyI

Ajoutée le 28 août 2015

This tutorial was made for the GTX 950, GTX 960, GTX 970, GTX 980, GTX 980 Ti, and GTX TITAN X.

UPDATE: I have updated the commands in here with the most recent driver Nvidia recommends for the GTX950-GTX TITAN X This guide will help you set up your Nvidia graphics card even if you boot to a blank sceen or are completely locked out of your GUI.

@charleslouis
charleslouis / keystone-Page.js
Created December 1, 2015 15:22
keystone-Page.js model page model
var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Page Model
* ==========
*/
var Page = new keystone.List('Page', {
map: { name: 'title' },
@charleslouis
charleslouis / _slider.scss
Created November 23, 2015 10:10
slider css and js
ul.slider-list{
position: relative;
display: block;
width: 100%;
overflow: hidden;
margin-top: 2em;
height: 5em;
margin-left: 0;
}
@charleslouis
charleslouis / youtube-play-video.js
Last active February 9, 2018 15:37
Youtube iframe ajax auto player with poster
'use strict';
// je déclare mes fonctions
function playTheVideoOnClick(idWrapper, posterClass, idVideoAttr){
// lancement de la video si clic sur button play sur cover image
$(idWrapper).click(function(){
var idVideo = $(this).attr(idVideoAttr);
var videoIframe = '<iframe width="560" height="315" src="https://www.youtube.com/embed/' + idVideo + '?rel=0&amp;showinfo=0&autoplay=1" frameborder="0" allowfullscreen></iframe>';
$(this).append(videoIframe);
$(this).find(posterClass).fadeOut();
@charleslouis
charleslouis / .general
Last active October 15, 2015 08:50
# Config Perso ZSH
################################
## Perso : ALIASES
################################
alias "rl"="source ~/.zshrc"
alias "cl"="clear"
alias "cdweb"="cd ~/projects/www-dev/public"
alias "cdapp"="cd ~/projects/apps-dev"
alias "opend"="nautilus ."
@charleslouis
charleslouis / fluid-width-video.css
Created February 17, 2015 09:04
Fluid Width Video
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
@charleslouis
charleslouis / README.md
Last active August 29, 2015 14:14
#wordpress #php.ini #php - increase memory size using php.ini in 1&1 servers for wordpress