Skip to content

Instantly share code, notes, and snippets.

@brunoconstantino
brunoconstantino / RedisCache.php
Last active May 23, 2024 22:55
Usando RedisCache no cache de objetos do Adianti Framework. Localização arquivo: app/lib/registry/RedisCache.php Link artigo: https://www.adianti.com.br/forum/pt/view_7449?cache-de-objetos-com-redis
<?php
//namespace Adianti\Registry;
use Adianti\Registry\AdiantiRegistryInterface;
//use Redis;
/**
* Adianti Redis Record Cache
*
* @version 7.4
@ssrihari
ssrihari / clojure-learning-list.md
Last active May 23, 2024 22:53
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
@suplo
suplo / vcode.md
Last active May 23, 2024 22:48
Quick hack to open vscode from fish shell

The code extension does not allow me to open folder with vscode from command line.
Solution: Add the following function to ~/.config/fish/config.fish

function vcode
  open -a "Visual Studio Code.app" $argv
end

then using vcode $folder to open $folder

@xiaomi7732
xiaomi7732 / ConfigureJWTBearerOptions.md
Last active May 23, 2024 22:43
Configure JWT Bearer Options based on other options

Configure JWT Bearer Options based on another option

The problem

AddJwtBearer() provides a delegate to configure JwtBearerOptions, see example. The problem is that there's no way to set the value based on another option.

For example, if you created a custom AuthOptions, which includes basic information like the signing key, audience, issuer, and so on to be configured environment by environment, there's no way to access it in AddJwtBearer() method.

If you prefer to read the code, here is an implementation.

Solution with a caveat (See next section for a solution that works)

@roachhd
roachhd / README.md
Last active May 23, 2024 22:38
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@enric1994
enric1994 / Dockerfile.webcam
Last active May 23, 2024 22:37
Using the webcam in a GPU enabled Docker Compose
FROM tensorflow/tensorflow:latest-gpu-py3
RUN apt update -y && apt install -y \
libsm6 \
libxext6 \
libxrender-dev
RUN pip install \
opencv-python
@maxsei
maxsei / stream.go
Last active May 23, 2024 22:36
streaming for EnTeRpRiSe
package stream
import (
"context"
"errors"
"sync"
)
type CancelableMessage[T any] struct {
ctx context.Context
@Schemetrical
Schemetrical / The_Jaunt.md
Last active May 23, 2024 22:30
The Jaunt by Stephen King

Chapter 1

"This is the last call for Jaunt-701," the pleasant female voice echoed through the Blue Concourse of New York's Port Authority Terminal. The PAT had not changed much in the last three hundred years or so - it was still gungy and a little frightening. The automated female voice was probably the most plesant thing about it. "This is Jaunt Service to Whitehead City, Mars," the voice continued. "All ticketed passengers should now be in the Blue Concourse sleep lounge. Make sure your validation papers are in order. Thank you."The upstairs lounge was not at all grungy. It was wall-to-wall carpeted in oyster gray. The walls were an eggshell white and hung with plesant nonrepresentational prints. A steady, soothing progression of colors met and swirled on the ceiling. There were one hundred couches in the large room, neatly spaced in rows of ten. Five Jaunt attendants circulate, speakingin low, cherry voices and offering glasses of milk. At one side of the room was the entranceway, flanked by armed guar

@TanjimReza
TanjimReza / UsisShowRoutine.console
Last active May 23, 2024 22:30
BRACU USIS Routine
$("#column2").append(
`
<li class="widget color-red">
<div class="widget-head" style="cursor: move;"><a href="http://usis.bracu.ac.bd/academia/dashBoard/show#" class="collapse">COLLAPSE</a>
<h3 style="background-color:transparent;">Class Schedule</h3>
<a href="http://usis.bracu.ac.bd/academia/dashBoard/show#" class="remove">CLOSE</a><a href="http://usis.bracu.ac.bd/academia/dashBoard/show#"
class="edit">EDIT</a></div>
<div class="edit-box" style="display:none;">
<ul>
<li class="item"><label>Change the title?</label><input value="Class Schedule"></li>
@BretFisher
BretFisher / docker-for-mac.md
Last active May 23, 2024 22:25
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1