42 developer's notes
This is Hugo based resources for ppolushkin.github.com resource.
Development
Run hugo server D
and open localhost:1313 site.
Publish
- Build public folder by running
hugo
command
hugo
- Go to public folder, commit and push to ppolushkin.github.com
cd public
git commit -am 'comment'
git push origin master
- Go to root folder, commit and push this root repository
cd ..
git commit -am 'comment'
git push origin master
Code highlighting examples
Golang:
func env(key, defaultVal string) string {
appPort, ok := os.LookupEnv(key)
if !ok {
appPort = defaultVal
}
return appPort
}
Java:
public static void mergeSort(int[] a) {
mergeSort(a, 0, a.length - 1);
}
static void mergeSort(int[] a, int low, int high) {
if (low == high) {
return;
}
int middle = (low + high) >>> 1;
mergeSort(a, low, middle);
mergeSort(a, middle + 1, high);
merge(a, low, middle, high);
}