Skip to content

Instantly share code, notes, and snippets.

@lzq420241
lzq420241 / yoc_mbedtls_tests.patch
Created October 10, 2020 12:01
mbedtls_tests transplant to YoC
diff --git a/tests/Makefile b/tests/Makefile
index 511db9db5..0b99fd4fd 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -55,7 +55,7 @@ DLEXT ?= so
EXEXT=
SHARED_SUFFIX=
# python2 for POSIX since FreeBSD has only python2 as default.
-PYTHON ?= python2
+PYTHON ?= python
@lzq420241
lzq420241 / example.md
Created August 21, 2019 08:59 — forked from sdnts/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@lzq420241
lzq420241 / post_echo.go
Created August 5, 2019 08:31
used for post related debug and development
package main
import (
"encoding/json"
"fmt"
"net/http/httputil"
"net/http"
)
func parseGhPost(rw http.ResponseWriter, request *http.Request) {
@lzq420241
lzq420241 / CustomSQLExceptionSubclassTranslator.java
Last active April 18, 2019 14:40
玩转Spring全家桶-12-课后思考题
package geektime.spring.data.errorcodedemo;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.support.SQLExceptionSubclassTranslator;
import org.springframework.lang.Nullable;
import java.sql.SQLException;
import java.util.Arrays;
@lzq420241
lzq420241 / delete_git_submodule.md
Created December 18, 2018 06:07 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule