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 main | |
import ( | |
// "encoding/json" | |
"context" | |
"fmt" | |
"net/http" | |
"os" | |
"os/signal" | |
"strconv" |
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 main | |
import ( | |
// "encoding/json" | |
"context" | |
"fmt" | |
"net/http" | |
"os" | |
"os/signal" | |
"syscall" |
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
$ cat .local/share/xorg/Xorg.0.log | |
[ 41.701] | |
X.Org X Server 1.19.3 | |
Release Date: 2017-03-15 | |
[ 41.701] X Protocol Version 11, Revision 0 | |
[ 41.701] Build Operating System: Linux 4.9.11-1-ARCH x86_64 | |
[ 41.702] Current Operating System: Linux sache 4.11.7-1-ARCH #1 SMP PREEMPT Sat Jun 24 09:07:09 CEST 2017 x86_64 | |
[ 41.702] Kernel command line: initrd=\initramfs-linux.img cryptdevice=/dev/sda4:disco root=/dev/mapper/disco rw | |
[ 41.702] Build Date: 07 April 2017 05:42:48PM | |
[ 41.702] |
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
func download_file(destination string, url string) error { | |
fmt.Println("%s -> %s\n", url, destination) | |
res, err := http.Get(url) | |
if err != nil { | |
log.Println(err) | |
return errors.New("Can't fetch data from URL") | |
} | |
defer res.Body.Close() |
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
set traffic-policy shaper WorldIn description "Download" | |
set traffic-policy shaper WorldIn bandwidth 9600kbit | |
set traffic-policy shaper WorldIn class 10 description "interactive" | |
set traffic-policy shaper WorldIn class 10 bandwidth 20% | |
set traffic-policy shaper WorldIn class 10 ceiling 100% | |
set traffic-policy shaper WorldIn class 10 match dns ip destination port 53 | |
set traffic-policy shaper WorldIn class 10 match ssh ip destination port 22 | |
set traffic-policy shaper WorldIn class 10 match icmp |
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
class Pila(object): | |
def __init__(self): | |
self._valores = [] | |
self._maximos = [] | |
def push(self, x): | |
self._valores.append(x) | |
ultimo_maximo = self._maximos.pop() | |
if x >= ultimo_maximo: |
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
import curses | |
from time import sleep | |
from random import randint | |
myscreen = curses.initscr() | |
MAX_RPM = 6500 | |
EMPTY = chr(9617) | |
FULL = chr(9619) | |
SPEED = ((0, 0), (1,20), (21,40), (35, 60), (50, 90), (60, 145)) |
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
from random import randint | |
import time | |
from django.db import transaction | |
from mobile.models import Mobile, Phone, Handy, Tablet, MobileNetwork | |
from asset.models import Asset | |
ROWS = 1000 | |
@transaction.atomic |
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
var Route = function(data) { | |
this.id = data.id; | |
this.waypoints = data.waypoints; | |
this._L_LatLng_list; | |
this._L_Polyline_obj; | |
}; | |
Route.prototype._fill_L_LatLng = function() { |
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
Traemos los heads y creamos un branch develop desde origin/develop (lo ejecutamos la primera vez). | |
$ git fetch origin | |
$ git checkout -b develop origin/develop | |
** Las proximas veces, como ya tenemos el branch develop localmente, siempre antes de crear un branch para un ticket nuevo corremos (parados en el branch develop): | |
$ git fetch origin | |
$ git pull | |
Creamos el branch del ticket, con su número y título. | |
$ git branch feature/Tnumber_ticket_title |