Skip to content

Instantly share code, notes, and snippets.

View vladimir-kazan's full-sized avatar
🎯

Vladimir Kuznetsov vladimir-kazan

🎯
  • Munich, Germany
View GitHub Profile
@Houtamelo
Houtamelo / lesson_deref.md
Last active April 16, 2025 23:52
Lesson - Deref

Introduction

This lesson aims to teach the reader about the inner-workings of Rust's *(deref operator) and trait Deref, as well as how to take advantage of those features.

Requirements

This lesson assumes that:

  • You have amateurish understanding of Rust's type system. Most importantly, understand that references are types, meaning &T, &mut T and T are all different types.

Terminology

@towry
towry / neo-tree-buffers-switcher.lua
Created July 23, 2024 01:18
use neo-tree buffers to switch buffers
--- depends: folke/flash.nvim
return {
"nvim-neo-tree/neo-tree.nvim",
opts = {
sources = { "filesystem", "buffers" },
source_selector = {
sources = {
{ source = "filesystem", display_name = " File" },
{ source = "buffers", display_name = " Buffers" },
},
{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,535,539,540,541,542,740,741,758,878,903,907,913,935]},{"id":2,"callFrame":{"functionName":"run","scriptId":"457","url":"node:internal/modules/esm/module_job","lineNumber":188,"columnNumber":11},"hitCount":0,"children":[3]},{"id":3,"callFrame":{"functionName":"evaluate","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[4]},{"id":4,"callFrame":{"functionName":"","scriptId":"475","url":"node:internal/modules/esm/translators","lineNumber":159,"columnNumber":66},"hitCount":0,"children":[5]},{"id":5,"callFrame":{"functionName":"require$$0.Module._load","scriptId":"479","url":"file:///private/tmp/next-app/.pnp.cjs","lineNumber":32556,"columnNumber":36},"hitCount":0,"children":[6]},{"id":6,"callFrame":{"functionName":"Module.load","scriptId":"452","url":"node:internal/modules/cjs/loader","lineNumber":1104,"columnNumber":32},"hitCount":0,"childre
@juancsr
juancsr / mac-docker-withot-docker-destop.md
Last active April 23, 2025 17:06
Use docker in mac without docker-
@ArcRanges
ArcRanges / gist.md
Last active March 18, 2025 03:33
aws-ec2-nextjs

Instructions to properly set up a production-ready NextJS App with AWS

This is a summary of how to start your own NextJS app, create the repo on Github, upload later in an AWS EC2 Instance and automate the process with AWS Codebuild, CodeDeploy, & CodePipeline.

After following these instructions you should be able to:

  • Create a NextJS App
  • Create an AWS EC2 instance
  • Be able to SSH to an EC2 instance
  • Prepare the instance as a Node environment
  • Configure Nginx service for proper routing
  • Configure domain and add SSL
@enagy27
enagy27 / tables.test.tsx
Last active October 19, 2024 15:40
React testing library table queries
import React from 'react';
import { render } from '@testing-library/react';
import { queryAllByTableHeader } from './tables';
describe('table testing utils', () => {
it('test', () => {
render(
<div role="region" aria-labelledby="caption-id">
<table>
@aaabramov
aaabramov / UTF-8 table (box) symbols.txt
Last active April 29, 2024 11:47
Drawing tables (boxes) using UTF-8 symbols
@degitgitagitya
degitgitagitya / .env
Last active April 21, 2025 09:13
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
@jasonsychau
jasonsychau / this_file_path.R
Last active October 13, 2024 16:19
R - get this file path
# a combination of
# https://stackoverflow.com/questions/1815606/determine-path-of-the-executing-script/15373917#15373917
# https://stackoverflow.com/questions/1815606/determine-path-of-the-executing-script/7585599#7585599
# https://stackoverflow.com/questions/47044068/get-the-path-of-current-script/47045368#47045368
# https://stackoverflow.com/questions/53512868/how-to-automatically-include-filepath-in-r-markdown-document/53516876#53516876
stub <- function() {}
thisPath <- function() {
cmdArgs <- commandArgs(trailingOnly = FALSE)
if (length(grep("^-f$", cmdArgs)) > 0) {
# R console option
@jjcodes78
jjcodes78 / nextjs-deploy.md
Last active January 2, 2025 15:03
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw