sudo mkdir /etc/mesos-dns
sudo vi /etc/mesos-dns/config.json
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
// para insertar fecha en campo textfield | |
new java.text.SimpleDateFormat("dd-MMM-yyyy HH:mm:ss z", java.util.Locale.US).format(new java.util.Date()) | |
// para mostrar fecha en español | |
new Locale("ES") | |
// usando groovy | |
new groovy.lang.GroovyShell().evaluate("Calendar cal = Calendar.getInstance(); cal.set(2009, 8, 8); return cal.getTime(); ") | |
![alt text](http://i.stack.imgur.com/O56lf.jpg "ejemplo de fecha") |
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
server { | |
listen 80; | |
server_name app.bolpros.com 10.11.25.2:8000; | |
# Strict Transport Security | |
add_header Strict-Transport-Security max-age=2592000; | |
rewrite ^/mobile.*$ https://10.0.2.15/web_mobile/static/src/web_mobile.html permanent; | |
rewrite ^/webdav(.*)$ https://10.0.2.15/webdav/$1 permanent; |
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
Por lo general utilizo esto {,} cuando necesito crear archivos numerados: archivo1, archivo2, archivo”n”: | |
> [ rafael ] ~ $ touch archivo{1..3}.log | |
> [ rafael ] ~ $ ls -lt | |
total 0 | |
-rw-r--r-- 1 rafael 0xl337 0B Nov 4 00:52 archivo1.log | |
-rw-r--r-- 1 rafael 0xl337 0B Nov 4 00:52 archivo2.log | |
-rw-r--r-- 1 rafael 0xl337 0B Nov 4 00:52 archivo3.log | |
> [ rafael ] ~ $ | |
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
# to move file or folders | |
tar zcf - filename | ssh user@ipaddress "cd /; tar xvzf" | |
# to move docker images to another host | |
docker save image-name | bzip2 | pv | ssh user@host "bunzip2 | docker load" | |
# using docker machine (testing yet) | |
docker $(docker-machine config mach1) save <image> | docker $(docker-machine config mach2) load | |
# send local file to container (just need to modify through host to host) |
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
#!/bin/bash | |
IMAGE_IDS=$(docker images -q --filter="dangling=true") | |
if [ -n "$IMAGE_IDS" ]; then | |
docker rmi $IMAGE_IDS > /dev/null 2>&1 | |
fi |
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
[Unit] | |
Description=Docker Application Container Engine | |
Documentation=https://docs.docker.com | |
After=network.target docker.socket | |
Requires=docker.socket | |
[Service] | |
Type=notify | |
ExecStart=/usr/bin/docker daemon -g /home/oracle/docker/docker/ -H fd:// | |
MountFlags=slave |
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
#!/bin/bash | |
if [ $# -eq 1 ] | |
NM=`uname -a && date` | |
NAME=`echo $NM | md5sum | cut -f1 -d" "` | |
then | |
ppa_name=`echo "$1" | cut -d":" -f2 -s` | |
if [ -z "$ppa_name" ] | |
then | |
echo "PPA name not found" | |
echo "Utility to add PPA repositories in your debian machine" |
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
<div ng-app="APP" ng-controller="MainController"> | |
<select> | |
<option ng-repeat="h_m in [] | time:8:20:15">{{h_m}}</option> | |
</select> | |
</div> |
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
[Desktop Entry] | |
Name=Napster | |
Comment=p2p | |
Exec=/home/user/Documentos/app-1-1-bin-32/appname | |
Icon=/home/user/Documentos/app-1-1-bin-32/icons/logo.xpm | |
Terminal=false | |
Type=Application | |
#Name: application name | |
#Comment: comment |