This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| http.createServer(function(request, response) { | |
| var uri = url.parse(request.url).pathname | |
| , filename = path.join(process.cwd(), uri); |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| // Photoshop Script to Create iPhone Icons from iTunesArtwork | |
| // | |
| // WARNING!!! In the rare case that there are name collisions, this script will | |
| // overwrite (delete perminently) files in the same folder in which the selected | |
| // iTunesArtwork file is located. Therefore, to be safe, before running the | |
| // script, it's best to make sure the selected iTuensArtwork file is the only | |
| // file in its containing folder. | |
| // | |
| // Copyright (c) 2010 Matt Di Pasquale | |
| // Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com |
| // Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
| (function poll(){ | |
| $.ajax({ url: "server", success: function(data){ | |
| //Update your dashboard gauge | |
| salesGauge.setValue(data.value); | |
| }, dataType: "json", complete: poll, timeout: 30000 }); | |
| })(); |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| # Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf | |
| ## | |
| ## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root | |
| ## | |
| df -h | |
| # Filesystem Size Used Avail Use% Mounted on | |
| # /dev/mapper/pve-root 37G 37G 0 100% / | |
| # tmpfs 2.0G 0 2.0G 0% /lib/init/rw |
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
As it turns out, there are several open-source tools that allow for conversion between file types. Pandoc is one of them, and it's powerful. In fact, pandoc's website says "If you need to convert files from one markup format into another, pandoc is your swiss-army knife." But, although pandoc can convert from markdown into .docx, it doesn't work in the other direction.
| #Install dpkg-dev and package dependencies | |
| sudo apt-get install dpkg-dev | |
| sudo apt-get install software-properties-common | |
| sudo apt-get install python-software-properties | |
| sudo apt-get install init-system-helpers | |
| #Add repository: | |
| sudo add-apt-repository ppa:nginx/stable | |
| #Edit /etc/apt/sources.list.d/nginx-stable-lucid.list, add dpkg-src (no need if ubuntu verson >= 12.04): |
| @echo off | |
| :: Path to Sublime Text installation dir. | |
| SET stPath=%~dp0sublime_text.exe | |
| SET stPathOnly=%~dp0 | |
| :: Key name for the registry entries. | |
| SET UserEntry=Sublime Text | |
| SET AdminEntry=Sublime Text As Admin | |
| :: Context menu texts. | |
| SET "UserMenuText=Open with Sublime(&-)" | |
| SET "AdminMenuText=Open with Sublime As Admin(&+)" |