Based on this article
ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does
This script can be copy paste to ssh as is. No hands installation. :-)
yum install zsh -y
| import com.intellij.openapi.editor.Document; | |
| import com.intellij.openapi.project.Project; | |
| import com.intellij.psi.PsiDocumentManager; | |
| import com.intellij.psi.PsiElement; | |
| import com.intellij.psi.PsiFile; | |
| import com.intellij.psi.PsiManager; | |
| import com.intellij.psi.PsiReference; | |
| import com.intellij.psi.search.searches.ReferencesSearch; | |
| import com.intellij.openapi.vfs.VirtualFile; |
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "time" | |
| _ "github.com/go-sql-driver/mysql" | |
| ) |
ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does
This script can be copy paste to ssh as is. No hands installation. :-)
yum install zsh -y
| package garbage | |
| import "testing" | |
| var i int | |
| func BenchmarkBoolInt(b *testing.B) { | |
| c := make(chan int, b.N) | |
| for i := 0; i < b.N; i++ { | |
| c <- i | |
| } |
| func BytesToStringWithNoCopy(bytes []byte) string { | |
| return *(*string)(unsafe.Pointer(&bytes)) | |
| } | |
| func StringToBytesWithNoCopy(s string) []byte { | |
| x := (*[2]uintptr)(unsafe.Pointer(&s)) | |
| h := [3]uintptr{x[0], x[1], x[1]} | |
| return *(*[]byte)(unsafe.Pointer(&h)) | |
| } |
| func Kill(port string) { | |
| output, _ := exec.Command("lsof", "-ti", "TCP:"+port).Output() | |
| pid, err := strconv.ParseInt(strings.Trim(string(output), "\n"), 10, 64) | |
| if err != nil { | |
| return | |
| } | |
| syscall.Kill(int(pid), syscall.SIGTERM) | |
| } |
| package adder | |
| import ( | |
| "sync" | |
| "sync/atomic" | |
| "testing" | |
| ) | |
| type Counter interface { | |
| Inc() |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "golang.org/x/net/http2" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |