$ ssh -A vm
$ git config --global url."[email protected]:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "[email protected]:"]
insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dont_clean = [ 'initial_vars' ] | |
def cleanup(): | |
print dont_clean | |
vars_to_free = [ k for k in set( globals().copy() ).difference( initial_vars.union( set( dont_clean ) ) ) ] | |
print vars_to_free, | |
for c in vars_to_free: | |
del globals()[ c ] | |
print "cleaned" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- table | |
-- name number | |
-- 1 10 | |
-- 2 20 | |
-- 3 10 | |
-- 4 30 | |
-- ... | |
-- result | |
-- name amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
"math/rand" | |
"sort" | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func printMemStats() { | |
memstats := new(runtime.MemStats) | |
runtime.ReadMemStats(memstats) | |
s.Log.Printf("memstats before GC: bytes = %d footprint = %d mallocs = %d frees = %d", | |
memstats.HeapAlloc, memstats.Sys, memstats.Mallocs, memstats.Frees) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [J grad] = nnCostFunction(nn_params, ... | |
input_layer_size, ... | |
hidden_layer_size, ... | |
num_labels, ... | |
X, y, lambda) | |
%NNCOSTFUNCTION Implements the neural network cost function for a two layer | |
%neural network which performs classification | |
% [J grad] = NNCOSTFUNCTON(nn_params, hidden_layer_size, num_labels, ... | |
% X, y, lambda) computes the cost and gradient of the neural network. The | |
% parameters for the neural network are "unrolled" into the vector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /entries/_search | |
{ | |
"query": { | |
"function_score": { | |
"query": { | |
"filtered": { | |
"query": { | |
"bool": { | |
"must": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(TeX-newline-function (quote newline)) | |
'(auto-image-file-mode t nil (image-file)) | |
'(blink-cursor-mode nil) | |
'(case-fold-search t) | |
'(deft-auto-save-interval 120.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type HighChart struct { | |
Chart struct { | |
Style struct { | |
Color string `json:"color,omitempty"` | |
} `json:"style,omitempty"` | |
RenderTo string `json:"renderTo,omitempty"` | |
BackgroundColor string `json:"backgroundColor,omitempty"` | |
LineColor string `json:"lineColor,omitempty"` | |
PlotShadpw bool `json:"plotShadow,omitempty"` | |
} `json:"chart,omitempty"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
type World struct { | |
Width int |
OlderNewer