- Install golang for arm64. The easiest way is brew install golang if you have the arm64 version of brew, which is working very well now. Or you can also download the latest arm64 version here: https://go.dev/dl/
- Install the Apple Silicon version of Goland
- Check out delve. The PR has already been merged, git clone https://github.com/go-delve/delve, then build it with cd delve && make install, which will put delve in
/Users/your_name/go/bin/dlv - Open Goland and go to
Help->Edit Custom VM Options. Add a line there with-Ddlv.path=/Users/your_name/go/bin/dlv
This file contains hidden or 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
| FROM node:14-slim | |
| WORKDIR /usr/src/app | |
| RUN apt-get update \ | |
| && apt-get install -y wget gnupg \ | |
| && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
| && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | |
| && apt-get update \ | |
| && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \ | |
| --no-install-recommends \ |
This file contains hidden or 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
| FROM composer@sha256:d374b2e1f715621e9d9929575d6b35b11cf4a6dc237d4a08f2e6d1611f534675 as build_stage | |
| WORKDIR /src | |
| RUN apk add nodejs npm | |
| COPY composer.json composer.lock ./ | |
| RUN composer install --prefer-dist --no-progress --no-scripts --no-autoloader --no-dev | |
| COPY package.json package-lock.json ./ | |
| RUN npm install | |
| COPY ./resources ./resources | |
| COPY webpack.mix.js . |
This file contains hidden or 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
| [includeIf "gitdir:/Volumes/Data/xantus/"] | |
| path = ~/.gitconfig-xantus | |
| [includeIf "gitdir:/Volumes/Data/personal/"] | |
| path = ~/.gitconfig-personal | |
| [includeIf "gitdir:/Volumes/Data/segu/"] | |
| path = ~/.gitconfig-segu |
This file contains hidden or 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
| [user] | |
| name = JackTT | |
| email = [email protected] |
This file contains hidden or 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
| [user] | |
| name = JackTT | |
| email = [email protected] |
This file contains hidden or 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
| public static boolean checksumAddress(String ethereumAddress) { | |
| // to fetch the part after 0x | |
| String subAddr = ethereumAddress.substring(2); | |
| // Make it to original lower case address | |
| String subAddrLower = subAddr.toLowerCase(); | |
| // Create a SHA3256 hash (Keccak-256) | |
| SHA3.DigestSHA3 digestSHA3 = new SHA3.Digest256(); | |
| digestSHA3.update(subAddrLower.getBytes()); | |
| String digestMessage = Hex.toHexString(digestSHA3.digest()); | |
| /* |
This file contains hidden or 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
| public static boolean checksumAddress(String ethereumAddress) { | |
| // to fetch the part after 0x | |
| String subAddr = ethereumAddress.substring(2); | |
| // Make it to original lower case address | |
| String subAddrLower = subAddr.toLowerCase(); | |
| // Create a SHA3256 hash (Keccak-256) | |
| SHA3.DigestSHA3 digestSHA3 = new SHA3.Digest256(); | |
| digestSHA3.update(subAddrLower.getBytes()); | |
| String digestMessage = Hex.toHexString(digestSHA3.digest()); | |
| /* |
This file contains hidden or 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" | |
| func main() { | |
| var results []*int | |
| for i := 0; i < 10; i++ { | |
| results = append(results, &i) | |
| } |
This file contains hidden or 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 chunkSlice(slice []int, chunkSize int) [][]int { | |
| var chunks [][]int | |
| for i := 0; i < len(slice); i += chunkSize { | |
| end := i + chunkSize | |
| // necessary check to avoid slicing beyond | |
| // slice capacity | |
| if end > len(slice) { | |
| end = len(slice) | |
| } |