Skip to content

Instantly share code, notes, and snippets.

View longyue0521's full-sized avatar

Longyue Li longyue0521

  • ELEX Technology
  • Beijing, China
  • 12:15 (UTC +08:00)
View GitHub Profile
@longyue0521
longyue0521 / gomock.md
Created January 19, 2023 10:38 — forked from thiagozs/gomock.md
Tutorial gomock

08/16/17 by  Sergey Grebenshchikov

No Comments

This is a quick tutorial on how to test code using the GoMock mocking library and the standard library testing package testing.

GoMock is a mock framework for Go. It enjoys a somewhat official status as part of the github.com/golang organization, integrates well with the built-in testing package, and provides a flexible expectation API.

@longyue0521
longyue0521 / pre-commit
Created September 1, 2022 02:09 — forked from liues1992/pre-commit
golang basic pre-commit check, including gofmt goimports golint
#!/bin/sh
# Partly copy from https://tip.golang.org/misc/git/pre-commit
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# git gofmt pre-commit hook
#
# To use, store as .git/hooks/pre-commit inside your repository and make sure
# it has execute permissions.
@longyue0521
longyue0521 / pre-commit
Created September 1, 2022 02:09 — forked from liues1992/pre-commit
golang basic pre-commit check, including gofmt goimports golint
#!/bin/sh
# Partly copy from https://tip.golang.org/misc/git/pre-commit
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# git gofmt pre-commit hook
#
# To use, store as .git/hooks/pre-commit inside your repository and make sure
# it has execute permissions.
@longyue0521
longyue0521 / memory_layout.md
Created December 22, 2017 08:39 — forked from CMCDragonkai/memory_layout.md
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@longyue0521
longyue0521 / byobuCommands
Created December 14, 2017 08:51 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window