Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
- Install Xcode from App Store or install Command Line Tools on your Mac
Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
// Write a pid file, but first make sure it doesn't exist with a running pid. | |
func writePidFile(pidFile string) error { | |
// Read in the pid file as a slice of bytes. | |
if piddata, err := ioutil.ReadFile(pidFile); err == nil { | |
// Convert the file contents to an integer. | |
if pid, err := strconv.Atoi(string(piddata)); err == nil { | |
// Look for the pid in the process list. | |
if process, err := os.FindProcess(pid); err == nil { | |
// Send the process a signal zero kill. | |
if err := process.Signal(syscall.Signal(0)); err == nil { |
package main | |
import ( | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"io" | |
"math/big" | |
) |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
sudo yum install libmpc-devel mpfr-devel gmp-devel | |
cd ~/Downloads | |
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O | |
tar xvfj gcc-4.9.2.tar.bz2 | |
cd gcc-4.9.2 | |
./configure --disable-multilib --enable-languages=c,c++ | |
make -j 4 | |
make install |
git branch -m master newname | |
git push origin newname | |
# Change "Default Branch" in settings/options in GitHub | |
git push origin :master |
# This function sorts the matrix for better visualization of mutual exclusivity across genes | |
memoSort <- function(M) { | |
geneOrder <- sort(rowSums(M), decreasing=TRUE, index.return=TRUE)$ix; | |
scoreCol <- function(x) { | |
score <- 0; | |
for(i in 1:length(x)) { | |
if(x[i]) { | |
score <- score + 2^(length(x)-i); | |
} | |
} |