ssh-copy-id -i ~/.ssh/id_rsa.pub [user@yourhost]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install watchdog -U | |
# now there is a command called "watchmedo", you'll like it... | |
# in terminal #1, run: | |
gunicorn app:myapp --pid=gunicorn.pid | |
# in terminal #2, run: | |
watchmedo shell-command \ | |
--patterns="*.py;*.html;*.css;*.js" \ | |
--recursive \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Go to /etc/default folder --> Open the file "jenkins" | |
2. Modify the line HTTP_PORT=8080 as HTTP_PORT=80 | |
3. Start jenkins by command: /etc/init.d/jenkins start | |
4. Open a browser and browse as localhost:80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#heroku config:set HEROKU=1 | |
import os | |
import urlparse | |
import psycopg2 | |
from flask import Flask | |
from flask_peewee.db import Database | |
if 'HEROKU' in os.environ: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.marceldias.mars.yaml; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.InputStream; | |
import org.yaml.snakeyaml.TypeDescription; | |
import org.yaml.snakeyaml.Yaml; |
$ docker --version Docker version 1.9.1, build a34a1d5
$ sudo mkdir -p /etc/resolver >/dev/null 2>&1
$ echo nameserver 172.17.0.1 | sudo tee /etc/resolver/docker > /dev/null
$ sudo route -n delete -net 172.17.0.0
$ sudo route -n add 172.17.0.0/16 $(docker-machine ip default)
$ sudo route -n add 172.17.0.1/32 $(docker-machine ip default)
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maximum number of history lines in memory | |
export HISTSIZE=50000 | |
# Maximum number of history lines on disk | |
export HISTFILESIZE=50000 | |
# Ignore duplicate lines | |
export HISTCONTROL=ignoredups:erasedups | |
# When the shell exits, append to the history file | |
# instead of overwriting it | |
shopt -s histappend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check if job exists | |
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
# with folder plugin | |
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# without folder plugin | |
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# create folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/a/14840304 | |
en gros: | |
npm config set prefix /usr/local au lieu de /usr/local/bin |
NewerOlder