Skip to content

Instantly share code, notes, and snippets.

View lucasbento's full-sized avatar
:shipit:

Lucas Bento lucasbento

:shipit:
View GitHub Profile
@mi5ty
mi5ty / tananodes_cheatsheet.md
Last active December 31, 2023 01:02
Tana Cheat Sheet

%%tana%%

  • Cheat Sheet
    • ✨ Tana Expressions
      • Title #tana-expression
        • Description:: A title expression composes values from the node into a title.
        • Attributes:: Search for Tana "Title" Attributes
      • Search #tana-expression
        • Description:: The search expression consists of a flat list of match-clauses that must be true for a node to match the search.
        • Attributes:: Search for Search Attributes + Search for Search Field Values
  • 🧩 Tana Attributes

gihub.ref vs gihub.head_ref

Trigger event pull_request pull_request_target
gihub.ref refs/pull/53/merge refs/heads/main
gihub.head_ref test/pull_request_target test/pull_request_target
  • main: default branch
  • test/pull_request_target: topic branch name
  • 53: pull request number
@yhauxell
yhauxell / coingecko-api-google-sheet.js
Last active July 19, 2022 09:03
Get coin data from CoinGecko API into google sheet
function COINGECKO(input = 'bitcoin', property = 'all', currency = 'usd') {
Logger.log(`Search for #> ${input} @prop: ${property} @currency: ${currency}`);
const cache = CacheService.getScriptCache();
let coinData = cache.get(input);
if(!coinData){
Logger.log('No cached coin data found! Let\'s fetch the api');
const URL = `https://api.coingecko.com/api/v3/coins/markets?vs_currency=${currency}&ids=${input}&price_change_percentage=24h,7d,14d,30d,1y`;
try{
@buddalee
buddalee / nextjs-device-detect.js
Created May 27, 2020 06:36
Nextjs in server side to detect device with user agent
Nextjs in server side to detect device with user agent
import { google } from 'googleapis';
import { Injectable, HttpService } from '@nestjs/common';
import { InjectSchedule, Schedule } from 'nest-schedule';
import { LoggerService } from '../logger/logger.service';
interface GoogleCalendarEvent {
id: string;
summary: string;
description: string;
// ...
@unnamedd
unnamedd / MacEditorTextView.swift
Last active April 16, 2024 10:18
[SwiftUI] MacEditorTextView - A simple and small NSTextView wrapped by SwiftUI.
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://twitter.com/tholanda
*
* MIT license
*/
import Combine
import SwiftUI
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

const React = require("react");
const Lifecycles = React.createLifecycleEvents({
didMount({ setState }) {
setState({
disabled: false,
});
},
didUpdate({ inputRef }) {
if (document.activeElement !== inputRef.value) {
@bvaughn
bvaughn / updating-external-data-when-props-changes-using-promises.js
Last active July 20, 2023 16:00
Example for loading new external data in response to updated props
// This is an example of how to fetch external data in response to updated props,
// If you are using an async mechanism that does not support cancellation (e.g. a Promise).
class ExampleComponent extends React.Component {
_currentId = null;
state = {
externalData: null
};
@midudev
midudev / animations.sh
Last active January 12, 2021 17:47
Make your OSX great again
# sh ./animations.sh
# set keyboard repeat rate to 0, so instant
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
# instant quick look animation
defaults write -g QLPanelAnimationDuration -float 0
# increase speed of animation when resizing window of Cocoa apps