Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

python server alias, cleanup

  • Loading branch information...
commit b1879377e73b07c2655c696a0050926296d5ccc2 1 parent 833a09d
@yedpodtrzitko authored
Showing with 26 additions and 7 deletions.
  1. +12 −5 .aliasrc
  2. +1 −2  .gitignore
  3. +13 −0 bootstrap
View
17 .aliasrc
@@ -12,20 +12,27 @@ alias reboot="dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKi
alias shutdown="dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop"
function take {
- mkdir -p $1
- cd $1
+ mkdir -p $1 && cd $1
}
function fag {
if [ -z ${1} ]; then
- echo "find . -type -f -exec grep -l '' {} \;"
- return 0
+ echo "find . -type -f -exec grep -l '' {} \;"
+ return 0
fi;
-
+
echo "looking for: ${1}"
find . -type f -exec grep -l $1 {} \;
}
+function server {
+ # Content-Type 'text/plain', UTF-8
+ local port="${1:-8090}"
+ python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "${port}"
+# }
+
+}
+
#python
alias delpyc="find . -name '*.py[co]' -delete"
alias run="python manage.py runserver 0.0.0.0:8000"
View
3  .gitignore
@@ -1,3 +1,2 @@
-*.pyc
-*.pyo
+*.py[co]
.idea
View
13 bootstrap
@@ -0,0 +1,13 @@
+#!/bin/bash
+cd "$(dirname "$0")"
+
+function distribute() {
+ rsync --exclude ".git/" --exclude "distribute" --exclude "etc" -av . ~
+}
+
+function collect() {
+ #TODO
+}
+
+if [ $1 = "collect" ]; then collect; else distribute; fi;
+
Please sign in to comment.
Something went wrong with that request. Please try again.