Skip to content

Instantly share code, notes, and snippets.

View bryanasdev000's full-sized avatar

Bryan A. S. bryanasdev000

View GitHub Profile
@pinealan
pinealan / nix-env-diff.bash
Last active September 12, 2023 12:04
Diff installed packages between nix generations
#!/usr/bin/env bash
# From https://github.com/pinealan/dotfiles
nix-list() {
nix-env --list-generations
}
get_current_gen() {
if [ -z $1 ] ; then
# default to current generation of nix-env
@kaychaks
kaychaks / configuration.nix
Last active March 10, 2022 16:00
matrix-jitsi-nixos
# accompanying blog - https://kaushikc.org/posts/matrix-jitsi-nixos.html
# /etc/nixos/configuration.nix
imports =
let
nur-no-pkgs =
import (
builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/master.tar.gz"
@cmod
cmod / hugofastsearch.md
Last active May 27, 2024 01:56 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@adisbladis
adisbladis / podman-shell.nix
Last active May 12, 2024 09:21
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@sdondley
sdondley / tmux split-window subcommand.md
Last active June 1, 2024 05:30
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the

@angristan
angristan / single-node-es.md
Last active February 4, 2024 19:55
Elasticsearch settings for single-node cluster (1 shard, 0 replica)

Elasticsearch settings for single-node cluster

1 shard, 0 replica.

For future indices

Update default template:

curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "0"}}' 
@mjbnz
mjbnz / nginx-rproxy-with-sso.md
Last active May 23, 2024 14:16
Nginx Reverse Proxy with simple SSO

Nginx Reverse Proxy for homelab services using SSO

NOTE: This document has now been added to the nginx-sso wiki, here. Any further updates will be made there.

Using:
@l13t
l13t / values.yaml
Created January 16, 2019 13:21
alertmanager alerts to slack for prometheus-operator
.......some config.....
alertmanager:
## Deploy alertmanager
##
enabled: true
## Service account for Alertmanager to use.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
@nikhilsingnurkar
nikhilsingnurkar / ConfigureRemotingForAnsible.ps1
Created January 8, 2019 05:29
Configure a Windows host for remote management with Ansible
#Requires -Version 3.0
# Configure a Windows host for remote management with Ansible
# -----------------------------------------------------------
#
# This script checks the current WinRM (PS Remoting) configuration and makes
# the necessary changes to allow Ansible to connect, authenticate and
# execute PowerShell commands.
#
# All events are logged to the Windows EventLog, useful for unattended runs.