Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| // LZW-compress a string | |
| function lzw_encode(s) { | |
| var dict = {}; | |
| var data = (s + "").split(""); | |
| var out = []; | |
| var currChar; | |
| var phrase = data[0]; | |
| var code = 256; | |
| for (var i=1; i<data.length; i++) { | |
| currChar=data[i]; |
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
| diff --git a/com.crashplan.engine.plist b/com.crashplan.engine.plist | |
| index d536a84..d189347 100644 | |
| --- a/com.crashplan.engine.plist | |
| +++ b/com.crashplan.engine.plist | |
| @@ -22,7 +22,7 @@ | |
| <string>/Applications/CrashPlan.app/Contents/Resources/Java</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| - <string>/usr/bin/java</string> | |
| + <string>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java</string> |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| { | |
| "env" : { | |
| "node": true | |
| }, | |
| "rules" : { | |
| "strict": [2, "global"], | |
| "quotes": [1, "single"], | |
| "key-spacing": [1, { "beforeColon" : true, "afterColon" : true }], |
| 'use strict'; | |
| var watson = require('../nodejs-wrapper/lib/index'); | |
| var fs = require('fs'); | |
| var natural_language_classifier = watson.natural_language_classifier({ | |
| url: 'https://gateway.watsonplatform.net/natural-language-classifier/api', | |
| username: 'USERNAME', | |
| password: 'PASSWORD', | |
| version: 'v1' |
| # Note – this is not a bash script (some of the steps require reboot) | |
| # I named it .sh just so Github does correct syntax highlighting. | |
| # | |
| # This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5 | |
| # | |
| # The CUDA part is mostly based on this excellent blog post: | |
| # http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/ | |
| # Install various packages | |
| sudo apt-get update |
| ;;; -------- TSV mode -------- | |
| (defface my-face-tsv-tab '((t (:background "black" :foreground "black"))) "Face for tabs in TSV.") | |
| (defvar my-face-tsv-tab 'my-face-tsv-tab) | |
| (defface my-face-tsv-2 '((t (:foreground "blue"))) "Face for 2nd column in TSV.") | |
| (defvar my-face-tsv-2 'my-face-tsv-2) | |
| (defface my-face-tsv-3 '((t (:foreground "yellow"))) "Face for 3rd column in TSV.") | |
| (defvar my-face-tsv-3 'my-face-tsv-3) |
| # MOVED to public repo: https://github.com/catchdave/ssl-certs/blob/main/replace_synology_ssl_certs.sh |