Skip to content

Instantly share code, notes, and snippets.

@ngsmrk
ngsmrk / sidekiq_monitoring
Created August 11, 2014 11:51
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
@david-yappeter
david-yappeter / binding-1.go
Last active May 3, 2024 14:42
gqlgen data validation
package directives
import (
"context"
"github.com/99designs/gqlgen/graphql"
"github.com/go-playground/validator/v10"
)
var (
@A248
A248 / Minecraft Servers: Managing Permissions.md
Last active May 3, 2024 14:42
What are permissions in Minecraft? How do I use them on Spigot, BungeeCord, or Sponge?

Introduction

You probably know you can give yourself and your friends OP status on your server. OPs can use any commands; they can change gamemodes, broadcast messages, and generally do whatever is possible with the plugins you have installed. They're basically super-administrators, with no checks on their capabilities.

If you're only running a small server for friends, using OP is perfectly fine. If you only give OP to trusted friends, it's all fine.

@johnfedoruk
johnfedoruk / clamd-setup.md
Last active May 3, 2024 14:40
Setting up ClamAV

ClamAV Setup Notes

Context

ClamAV can be used in a few different ways. Most importantly, it provides the ability to scan files in realtime (on-access) or to scan the file system periodically.

I tried configuring ClamAV to both perform on-access virus scanning and to perform nightly full filesystem scanning. Using the on-access option did not prove to be very useful, however a scheduled full system scan seems to be of value.

Here is my story.

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

@khattaksd
khattaksd / seed.sql
Created September 22, 2023 00:19
Supabase Seed Users for local development & testing
-- supabase/seed.sql
--
-- create test users
INSERT INTO
auth.users (
instance_id,
id,
aud,
role,
email,
[user]
name = Put In Your Own
email = I.aint@tellin.you
[alias]
# Shortcuts, cuz' I'm lazy
ci = commit
br = branch -v
bra = branch -v -a
co = checkout
@u1i
u1i / doit.txt
Created June 21, 2021 11:28
pdftk MacOs M1
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 14:32
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
@sergiecode
sergiecode / instalaciones-git-github.md
Last active May 3, 2024 14:30
Instalaciones para curso GIT & GITHUB DESDE CERO