Skip to content

Instantly share code, notes, and snippets.

View epayet's full-sized avatar

Emmanuel Payet epayet

View GitHub Profile

Keybase proof

I hereby claim:

  • I am epayet on github.
  • I am jakspinning (https://keybase.io/jakspinning) on keybase.
  • I have a public key whose fingerprint is E0E0 380C 3AFC 4E09 5C6E C93C 1A85 A4CD 2431 1991

To claim this, I am signing this object:

@epayet
epayet / mj-image-max-width-desktop.png
Last active February 23, 2016 12:23
mjml mjml-image max-width
mj-image-max-width-desktop.png
@epayet
epayet / trick-protractor.js
Created November 26, 2015 16:16
Strange trick to avoid element not visible errors
browser.wait(function () {
return editAnswersPage.currentBraSize.getText().then(function(text) {
return text == '32C'; // Do a little Promise/Boolean dance here, since wait will resolve promises.
});;
}, 10000, 'menu should dissappear').then(function(value) {
console.log(value);
});
fswatch -0 . | xargs -0 -n1 -I{} echo hello
@epayet
epayet / .travis.yml
Created October 24, 2015 16:17
Travis file for ftp deployment
language: node_js
node_js:
- 0.11
before_script:
- npm install -g bower gulp karma-cli
- bower install
script:
- gulp build
- npm test
after_success:
@epayet
epayet / conv-script.sh
Last active September 26, 2015 12:37
Shell script to convert wma files to mp3. Ex: ./conv-script.sh .
#!/usr/bin/env bash
set +o posix
cd $1
find . -type f | grep wma$ > wma-files.txt
readarray -t files < wma-files.txt
for file in "${files[@]}"; do
out=${file%.wma}.mp3
npm install
export PROJECT_CONFIG='production'
if forever list | grep 'project.js' ; then
forever stop project.js
fi
forever start project.js
forever list | grep 'project.js'
@epayet
epayet / Docker tips
Created November 13, 2014 09:59
Docker tips
# Remove every docker images with no name
for i in `docker images|grep \<none\>|awk '{print $3}'`;do docker rmi $i;done
@epayet
epayet / ReverseProxy
Created October 28, 2014 09:51
ReverseProxy
#Reverse proxy: http://blog.xn--hry-bma.com/article9/configurer-un-reverse-proxy-apache-http-https
#For http
a2enmod proxy
a2enmod proxy_http
echo -e "<VirtualHost *:80> \n ServerName url.com \n ProxyPreserveHost On \n ProxyRequests off \n ProxyPass / http://localhost:8081/ \n ProxyPassReverse / http://localhost:8081/ \n </VirtualHost>" > /etc/apache2/sites-available/test.conf
a2ensite test
a2dissite 000-default
/etc/init.d/apache2 reload
/etc/init.d/apache2 restart