A Pen by najam awan on CodePen.
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 StreamHandler(w http.ResponseWriter, r *http.Request) { | |
log.Println("string handler invoked") | |
for i := 0; i < 15000; i++ { | |
w.Write([]byte("Gorilla! \n")) | |
w.(http.Flusher).Flush() | |
time.Sleep(1 * time.Second) | |
// time.Sleep(1 * time.Second) | |
} | |
fmt.Println("done") | |
} |
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
docker run -p 5432:5432 -d \ | |
-e POSTGRES_PASSWORD=postgres \ | |
-e POSTGRES_USER=postgres \ | |
-e POSTGRES_DB=stripe-example \ | |
-v ~/dockerVols/pg:/var/lib/postgresql/data \ | |
postgres |
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 ( | |
"encoding/json" | |
"github.com/gorilla/mux" | |
"log" | |
"net/http" | |
) | |
type SomeStruct struct { |
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
" vim-plug: Vim plugin manager | |
" ============================ | |
" | |
" Download plug.vim and put it in ~/.vim/autoload | |
" | |
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
" | |
" Edit your .vimrc | |
" |
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
# Cassandra storage config YAML | |
# NOTE: | |
# See http://wiki.apache.org/cassandra/StorageConfiguration for | |
# full explanations of configuration directives | |
# /NOTE | |
# The name of the cluster. This is mainly used to prevent machines in | |
# one logical cluster from joining another. | |
cluster_name: 'Test Cluster' |
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
//http://www.smashingmagazine.com/2011/07/12/behind-the-scenes-of-nike-better-world/ | |
$('section[data-type="background"]').each(function(){ | |
// Store some variables based on where we are | |
var $self = $(this), | |
offsetCoords = $self.offset(), | |
topOffset = offsetCoords.top; | |
// When the window is scrolled... |
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
$EmailFrom = "from@mail.com" | |
$EmailTo = "to@mail.com" | |
$Subject = "emailing powershell report" | |
$Body = "this should work on remove server as well. test email" | |
$SMTPServer = "smtp.gmail.com" | |
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) | |
$SMTPClient.EnableSsl = $true | |
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("gmailUser", "gmailPasswor"); | |
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body) |
A Pen by najam awan on CodePen.
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
D:\mongodb\bin>mongod --remove |
NewerOlder