Skip to content

Instantly share code, notes, and snippets.

View newmind's full-sized avatar
🎯
Focusing

JG newmind

🎯
Focusing
View GitHub Profile
@newmind
newmind / clojure-learning-list.md
Created February 18, 2024 12:30 — forked from ssrihari/clojure-learning-list.md
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@newmind
newmind / init.toml
Created November 3, 2023 18:11 — forked from yoonhoGo/init.toml
~/.SpaceVim.d/init.toml
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]
@newmind
newmind / oban_workflow_test.exs
Last active September 4, 2023 05:23
Oban Workflow test
defmodule MomentiDomain.Workers.MyWorkflowTest do
use MomentiDomain.V4.DataCase, async: false
use Oban.Pro.Testing, repo: MomentiDomain.Repo, log: :debug
defmodule MyWorkflow do
use Oban.Pro.Workers.Workflow, recorded: true
alias MomentiDomain.Repo
defmodule Logic do
@newmind
newmind / postgresql-fulltext-search.ex
Created February 15, 2023 01:07 — forked from esconsut1/postgresql-fulltext-search.ex
Postgresql Fulltext Search Ecto Migration Example
@doc """
Easy, simple migration statements for setting up Postgresql Fulltext Search
using Ecto, Elixir.
Add this (modify for your stuff)
Run:
mix ecto.migrate
Then you can make FTS queries on your data
"""
@newmind
newmind / install-pre-push.sh
Created January 13, 2022 03:57 — forked from stefansundin/install-pre-push.sh
Git pre-push hook to prevent force pushing the master/main branch.
#!/bin/bash
# This script will install a Git pre-push hook that prevents force pushing the master/main branch.
# There are three variants that I have built:
# - pre-push: prevents force-pushing to master/main.
# - pre-push-2: prevents force-pushing to master/main depending on the remote (you need to edit the file!).
# - pre-push-3: prevents any type of pushing to master/main.
# Set the desired version like this before proceeding:
# FILE=pre-push
# Single repo installation:
@newmind
newmind / multiple_ssh_setting.md
Created November 7, 2021 16:17 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@newmind
newmind / example.puml
Created August 17, 2021 07:48 — forked from QuantumGhost/example.puml
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@newmind
newmind / unity3d_multiplypoint_3_4.md
Created January 19, 2021 06:31 — forked from justinmeiners/unity3d_multiplypoint_3_4.md
What is the difference between MultiplyPoint and MultiplyPoint3x4 in Unity3D?

What is the difference between MultiplyPoint and MultiplyPoint3x4 in Unity3D?

What steps of a matrix multiplication could Unity possibly be skipping to make an optimization? The optimization is possible because a scaling and rotation needs only a 3x3 matrix and another vector for the translation, so part of the full 4x4 matrix is unused and can be ignored.

Here is the source code taken from the decompilation [here][1]:

public Vector3 MultiplyPoint(Vector3 v)

{

@newmind
newmind / db모니터링.md
Created January 19, 2021 00:27
db 성능모니터링
@newmind
newmind / pelco_d.py
Created May 11, 2020 06:48 — forked from jn0/pelco_d.py
PELCO-D Protocol
# -*- coding: utf-8 -*-
'''The Pelco-D Protocol
Standard Number TF-0002
Version 2 Revision 1 Release Date August 15, 2003
Transmitters will format a single character and receivers will be able to
decipher a single character as: 1 start bit, 8 data bits, 1 stop bit,
and no parity.