Skip to content

Instantly share code, notes, and snippets.

View oscargicast's full-sized avatar
🐍
To the infinity and beyond

Oscar oscargicast

🐍
To the infinity and beyond
View GitHub Profile

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
#!/bin/bash
NAME="hello_app" # Name of the application
DJANGODIR=/webapps/hello_django/hello # Django project directory
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
USER=michal # the user to run as
GROUP=michal # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name
@oscargicast
oscargicast / demo1
Created January 18, 2014 21:00
first demo
def print_two(*args):
arg1, arg2 = args
print "arg1:%r, arg2: %r" %(arg1, arg2)
def print_two_again(arg1, arg2):
print "arg1: %r, arg2: %r" %(arg1, arg2)
def print_one(arg1):
print "arg1: %r" %arg1
a = "Python"
#Imprime caracteres individuales en a
for c in a:
print c
b =['Python', 'Node.js', 'C++', 'R']
#Imprime los miembros de una lista
for name in b:
print name
hackspace_paginas_homepage:
pattern: /hello/{name}
defaults: { _controller: HackspacePaginasBundle:Default:index }
_homepage:
pattern: /bienvenida
defaults: { _controller: HackspacePaginasBundle:Default:bienvenida }
_homework:
pattern: /operacion/{variable1}/{variable2}/sumar
<?php
namespace Hackspace\PaginasBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction($name)
{
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h1>Suma</h1>
<p>
{{variable1}} + {{variable2}} = {{result}}
@oscargicast
oscargicast / README.md
Last active April 29, 2017 19:24
Configuracion de entorno de desarrollo para python.

Configuracion de entorno de desarrollo para python

Esta configuracion sera usada bajo el SO Ubuntu.

Atentamente. Comunidad python-uni

GIT

"vemos las diferecias entre nuestra entidad en symfony y la db"
$ php app/console doctrine:schema:update --dump-sql
"ejecutamos comandos sql para realizar los cambios anteriores"
$ php app/console doctrine:schema:update --force
$ php app/console doctrine:generate:entities --help
"genera getter and setter para la entidad HackspaceUniChatBundle"
$ php app/console dorctrine:generate:entities HackspaceUniChatBundle:Mensaje
@oscargicast
oscargicast / gg.md
Last active August 29, 2015 13:56
clase Giorgio

VPS

+digitalocean* +linode +rackspace

amazon web service - EC2

amazon S3 - storage