#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.
-
putty
Set
Connection -> Data -> Terminal-type stringtoxterm-256color -
tmux
Add this line to ~/.tmux.conf
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "html/template" | |
| "github.com/gorilla/sessions" |
#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.
putty
Set Connection -> Data -> Terminal-type string to xterm-256color
tmux
Add this line to ~/.tmux.conf
| /* | |
| gittip: a basic git http server. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright 2014 Chase Zhang <[email protected]> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long |
| func logger(prefix string, h http.Handler) http.HandlerFunc { | |
| return func(w http.ResponseWriter, r *http.Request) { | |
| // Save a copy of this request for debugging. | |
| requestDump, err := httputil.DumpRequest(r, false) | |
| if err != nil { | |
| log.Println(err) | |
| } | |
| log.Println(prefix, string(requestDump)) |
| // Copyright 2013 René Kistl. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| package srpc | |
| import ( | |
| "errors" | |
| "fmt" | |
| "github.com/pcdummy/skynet2/rpc/bsonrpc" |
| func EncodeStreamingVideo(streamingFile io.Reader, request ShouldCanceler) (*os.File, error) { | |
| outputFilename := generateFilename("mp4") | |
| // Actually start the command. | |
| cmd := exec.Command("ffmpeg", | |
| // Read input from stdin. | |
| "-i", "-", | |
| // ... environment-specific ffmpeg options ... | |
| "-y", outputFilename) |
| package main | |
| import ( | |
| "net/http" | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "os" | |
| ) |
| /// <summary> | |
| /// AskAlert expects a return value of AlertResult.YES or AlertResult.NO | |
| /// </summary> | |
| public override AlertResult AskAlert(SimplyMessage message) | |
| { | |
| Console.WriteLine(message.Message); | |
| if ((new Regex(@"^You did not enter an amount on the invoice")).Match(message.Message).Success) | |
| { | |
| return AlertResult.YES; |
| Compile the latest Vim 7.4 on CentOS 7 | |
| # yum install gcc make ncurses ncurses-devel | |
| # yum install ruby ruby-devel lua lua-devel luajit \ | |
| luajit-devel ctags git python python-devel \ | |
| python3 python3-devel tcl-devel \ | |
| perl perl-devel perl-ExtUtils-ParseXS \ | |
| perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \ | |
| perl-ExtUtils-Embed |
| <html> | |
| <head> | |
| <script src="/static/jqwidgets-ver4.1.2/scripts/jquery-2.2.4.min.js"></script> | |
| <script> | |
| $( document ).ready(function() { | |
| var token = ""; | |
| // Global AJAX Configuration | |
| $.ajaxSetup({ | |
| type: 'post', |