Steps with explanations to set up a server using:
- Virtualenv
- Virtualenvwrapper
- Django
- Gunicorn
| ;; (require '[clojure.string :as str] '[clojure.java.shell :as shell] '[taoensso.timbre :as timbre]) | |
| (defn with-free-port! | |
| "Attempts to kill any current port-binding process, then repeatedly executes | |
| nullary `bind-port!-fn` (which must return logical true on successful | |
| binding). Returns the function's result when successful, else throws an | |
| exception. *nix only. | |
| This idea courtesy of Feng Shen, Ref. http://goo.gl/kEolu." | |
| [port bind-port!-fn & {:keys [max-attempts sleep-ms] |
| sudo apt-get purge gnome-games-* xdiagnose aisleriot gnome-dictionary gnome-contacts gnumeric abiword cheese alacarte rhythmbox alacarte | |
| sudo apt-get autoremove | |
| sudo apt-add-repository ppa:gnome3-team/gnome3 | |
| sudo apt-add-repository ppa:webupd8team/sublime-text-2 | |
| sudo add-apt-repository ppa:mystic-mirage/komodo-edit | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install sublime-text-2-dev dkms ppa-purge oracle-java6-installer | |
| sudo apt-get install htop tmux screen software-center jockey-gtk git-core mercurial vim font-manager xclip vim tasksel |
| { | |
| "always_prompt_for_file_reload": false, | |
| "auto_complete": false, | |
| "auto_complete_commit_on_tab": true, | |
| "auto_find_in_selection": false, | |
| "caret_style": "phase", | |
| "color_scheme": "Packages/User/Themes/Mac CLassic.tmTheme", | |
| "copy_with_empty_selection": false, | |
| "default_line_ending": "unix", | |
| "diff_changes_to_buffer": true, |
| #!/usr/bin/php | |
| <?php | |
| /** | |
| * .git/hooks/pre-commit | |
| * | |
| * This pre-commit hooks will check for PHP error (lint), and make sure the code | |
| * is PSR compliant. | |
| * | |
| * Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
| * |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| package main | |
| import ( | |
| "net/http" | |
| "log" | |
| "fmt" | |
| ) | |
| func main() { | |
| http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |