Skip to content

Instantly share code, notes, and snippets.

@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
@srcrip
srcrip / example.html.heex
Last active May 3, 2024 14:30
Some helper functions for making nested forms in LiveView
<.form for={@form} class="max-w-xs">
<NestedFormComponents.inputs_for_embeds
:let={embed_form}
parent_form={@form}
field={@form[:items]}
id={"#{@form[:items].id}_embeds"}
sort_param={:items_sort}
drop_param={:items_drop}
>
<div class="grow">
@Pingu501
Pingu501 / gitlab-artifacts-cleanup.py
Created December 9, 2021 11:22
GitLab Artifacts Clean-Up
"""
This is a small python script to clear up old gitlab build artifacts.
There are 3 variables you should modify:
* base_url: path to your gitlab
* access_token: your personal access token to make gitlab api calls
* delete_everything_older_than: configure the timedelta as you wish
!!IMPORTANT!!
By default this script does only make dry-runs and does not actually delete any files!
@dshoreman
dshoreman / slurp.md
Last active May 3, 2024 14:28
Swaymsg commands for listing windows and outputs

i3

Get Active Window ID

xdotool getactivewindow

Get Current Desktop ID

xdotool get_desktop_for_window "$(xdotool getactivewindow)"