Skip to content

Instantly share code, notes, and snippets.

@Quorafind
Quorafind / Dynamic Highlight.data.md
Last active May 13, 2024 02:50
Using dynamic highlight to highlight HH:mm/H:mm time format in Obsidian

Import data json below to dynamic highlight config.

{
  "light-time-8-5": {
    "class": "light-time-8-5",
    "color": "#E45858",
    "regex": true,
    "query": "(?<=\\s)(0?8|20):[3-5][0-9](:[0-5][0-9])?(?=(\\s|$))",
    "mark": [
@jl2
jl2 / gpxparse.c
Created May 7, 2010 05:14
Parse GPX file using libxml2
/* gpxparse.c
Copyright (c) 2010, Jeremiah LaRocco jeremiah.larocco@gmail.com
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@juanfal
juanfal / gist:09d7fb53bd367742127e17284b9c47bf
Created January 10, 2020 09:07
Codon table in Python dict
codontab = {
'TCA': 'S', # Serina
'TCC': 'S', # Serina
'TCG': 'S', # Serina
'TCT': 'S', # Serina
'TTC': 'F', # Fenilalanina
'TTT': 'F', # Fenilalanina
'TTA': 'L', # Leucina
'TTG': 'L', # Leucina
'TAC': 'Y', # Tirosina
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@Quorafind
Quorafind / AskChatGPT-With-Surfing.js
Created February 19, 2023 11:20
Using Quickadd to ask current selection In ChatGPT
// Version 0.0.1
module.exports = askChatWithPrompt;
function askChat(str, app) {
const prompt = encodeURI(str);
const chatViewEl = app.workspace.getLeavesOfType("surfing-view").find((item)=>{ return /chat\.openai\.com/.test(item?.view?.currentUrl)}).view.webviewEl;
chatViewEl.executeJavaScript(`
var htmlElement = document.querySelector("textarea");
htmlElement.value = decodeURI("${ prompt }");
@luismts
luismts / GitCommitBestPractices.md
Last active May 13, 2024 02:46
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@imba-tjd
imba-tjd / .Cloud.md
Last active May 13, 2024 02:45
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@iwalton3
iwalton3 / data-format.json
Created May 12, 2023 03:52
Message Splitter - Split chat messages into chunks for training GPTs
{
"data": "%data%"
}
@dragonfire1119
dragonfire1119 / n8n-docker-compose
Last active May 13, 2024 02:41
Docker compose for n8n.io
version: '3'
services:
n8n:
image: docker.n8n.io/n8nio/n8n
ports:
- 5678:5678
environment:
- GENERIC_TIMEZONE=America/Chicago
- TZ=America/Chicago