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
$GOPATH | |
/src | |
/github.com/user/repo | |
/mypkg | |
mysrc1.go | |
mysrc2.go | |
/cmd/mycmd | |
main.go | |
/bin | |
mycmd |
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 ( | |
"log" | |
"gopkg.in/telegram-bot-api.v4" | |
) | |
func main() { | |
bot, err := tgbotapi.NewBotAPI("** bot token **") |
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
Host github | |
HostName github.com | |
User git |
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
Host Cibernomadas | |
HostName xx.xx.xx.xx | |
Port 1234 | |
User juanito |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Cibernómadas</title> | |
</head> | |
<body> | |
<h1>Blog de tecnología</h1> | |
<p>Esta es nuestra web: | |
<a href="http://www.cibernomadas.es/">Cibernómadas</a> | |
</p> |
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 flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello(): | |
return 'Hello, World!' |
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
$> FLASK_APP=hello.py flask run | |
* Serving Flask app "hello.py" | |
* Environment: production | |
WARNING: Do not use the development server in a production environment. | |
Use a production WSGI server instead. | |
* Debug mode: off | |
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) |
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 flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def indexFn(): | |
return ''' | |
<html> | |
<head> | |
<title>Calculadora</title> |
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
if update.Message.IsCommand() { | |
// Comprobar comando suma | |
// Comprobar comando resta | |
// Comprobar comando multiplicación | |
// Comprobar comando división | |
// Comprobar comando start | |
} |
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 normalizaCadena(arg string) []string { | |
re := regexp.MustCompile(" +") | |
aux := re.ReplaceAllString(arg, " ") | |
return strings.Split(aux, " ") | |
} |
OlderNewer