Skip to content

Instantly share code, notes, and snippets.

View citmusa's full-sized avatar

Citlalli Murillo citmusa

View GitHub Profile
from ftplib import FTP
import sys, os
# Connect
ftp = FTP('serverName')
ftp.login('user', 'password')
# Directory of the local files
root = "path/to/root/directory/"
@citmusa
citmusa / gist:5400127
Created April 16, 2013 22:18
Box Vagrant
https://kippt.com/netoxico/web-development/clips/8293246
@citmusa
citmusa / GIT color
Last active December 17, 2015 02:38
remove directory not empty
git config --global color.ui auto
@citmusa
citmusa / gist:5600374
Created May 17, 2013 16:46
proyecto base de django-bootstrap
https://github.com/netoxico/django-bootstrap
@citmusa
citmusa / gist:5628478
Created May 22, 2013 15:27
web to epub
http://www.web2fb2.net/

###ANGULAR.JS

<html ng-app>

###Data Binding

<input type="text" ng-model="yourModel">
db.collection.find({ query },{"field to show": true, "field to show": true})
db.collection.find({ query },{"field to show": true, "_id": false })
@citmusa
citmusa / SimpleHTTPServer
Created February 25, 2014 16:47
python simple server
python -m SimpleHTTPServer
python -m SimpleHTTPServer 8080
@citmusa
citmusa / .htaccess
Created September 10, 2014 01:47
alwaysdata django app deploy
##########################
### .htaccess
### /(manage.py dir)/public
##########################
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ django.fcgi/$1 [QSA,L]
@citmusa
citmusa / rawSQL.py
Last active January 12, 2017 08:41
delete heroku - postgress table
python manage.py shell:
>>> sql = '''drop table mytable cascade;
... drop table mytable2; '''
>>>
>>> from django.db import connections, transaction
>>> cursor = connections['default'].cursor()
>>> cursor.execute(sql)