Skip to content

Instantly share code, notes, and snippets.

@jsliang
jsliang / yearlyMoc.js
Last active May 8, 2024 19:05
Yearly MOC Generator - Obsidian Templater User Script
/**
* @author Jui-Shan (Jenny) Liang <jsliang.tw@gmail.com>
* @param {Object} tp the `tp` object of the Templater plugin
* @param {Object} options options for configuring the year to generate the MOC and the file name format
* @param {string} options.YEAR what year to generate the MOC; default to the current year
* @param {string} options.YEARLY_FORMAT filename format of yearly notes; format reference: https://momentjs.com/docs/#/displaying/format/
* @param {string} options.QUARTER_FORMAT filename format of quarterly notes; format reference: https://momentjs.com/docs/#/displaying/format/
* @param {string} options.MONTH_FORMAT filename format of monthly notes; format reference: https://momentjs.com/docs/#/displaying/format/
* @param {string} options.WEEK_FORMAT filename format of weekly notes; format reference: https://momentjs.com/docs/#/displaying/format/
* @param {string} options.DAY_FORMAT filename format of daily notes; format reference: https://momentjs.com/docs/#/displaying/format/
<php
class NameClass {
/**
* Genera numero secuencial de solicitud
*/
public function getNextOrderNumber()
{
// Get the last created order
$lastOrder = TuModelo::orderBy('created_at', 'desc')->first();
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 8, 2024 19:01
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@davidteren
davidteren / nerd_fonts.md
Last active May 8, 2024 19:00
Install Nerd Fonts via Homebrew [updated & fixed]
@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active May 8, 2024 19:00
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@zmts
zmts / tokens.md
Last active May 8, 2024 18:59
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@gmpsankalpa
gmpsankalpa / CompleteRecentDiscordQuest.md
Created May 8, 2024 18:45
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

@rms1000watt
rms1000watt / jinja2-omit-comma-from-item.txt.j2
Created October 18, 2019 21:10
Jinja2 omit comma from last item in list
# Courtesy of: https://stackoverflow.com/a/11974399
{%- for item in items %}
[
"{{item}}"{{ "," if not loop.last }}
]
{%- endfor %}
@vratiu
vratiu / .bash_aliases
Last active May 8, 2024 18:55
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset