Skip to content

Instantly share code, notes, and snippets.

@r8d8
r8d8 / go_style_guide.md
Last active April 13, 2018 14:41
Golang code style

The code should be read sequentially from beginning to end as a good prose, for code it means grouping logic from main high-level concepts to particular low-level details. In the rest, we simply follow S.O.L.I.D principals.

Recommended way to organize the code:

Length limits (inspired by NASA C Style guide):

  • function body <= 60 loc (to be suitable for single screen)
  • source file <= 600 loc

Nem-toolchain version v0.2

It now can measure generation rate and estimate calculation time. As generation made by random keypair generation, time estimation only possible by probability level. Currently nem-toolchian estimates time for 3 probaility levels - 50%(min), 80%(average), 99.9%(definetly)

Also nem-toolchainnow now has a website with doc and examples, for more info visit here

asciicast

@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active November 26, 2023 12:40
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@gregmalcolm
gregmalcolm / debugging_c_with_llvm.md
Last active September 8, 2021 10:47
Debugging C with llvm's clang and lldb

Assuming you llvm installed (comes as standard on Mac OS Mavrick xtools)

Create a helloworld.c file:

  #include<stdio.h>
  
  int main()
  {
 int x=3;