Skip to content

Instantly share code, notes, and snippets.

@f41gh7
f41gh7 / api-server.yaml
Last active August 21, 2023 10:31
vm operator configuration examples
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: apiserver
namespace: monitoring-system
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
bearerTokenSecret:
key: ""
@mreider
mreider / mem-cpu.md
Created September 4, 2019 11:05
Reset memory and CPU in multipass

Stop multipass sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist

Edit the config sudo vim /var/root/Library/Application\ Support/multipassd/multipassd-vm-instances.json

you can edit “mem_size” there (it’s in bytes)

Start it again. sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist

@crmaxx
crmaxx / install.log
Last active March 24, 2024 23:03
Installing and configuring P4Merge for Git on Ubuntu
# based on http://blogs.pdmlab.com/alexander.zeitler/articles/installing-and-configuring-p4merge-for-git-on-ubuntu/
$ cd ~/Downloads
$ wget https://cdist2.perforce.com/perforce/r18.2/bin.linux26x86_64/p4v.tgz
$ tar zxvf p4v.tgz
$ sudo mkdir /opt/p4v
@fasiha
fasiha / no-hackerrank.md
Last active August 7, 2023 11:47
A prospective employer invited me to do a HackerRank test. Here's my proposed alternative.

Well, that was unexpected. In the following, I’m trying to follow Jon Evans’ advice from “The Terrible Technical Interview”.


To: recruitment@EmployerABC.com
From: Ahmed Fasih
Subject: Re: Programming Test Invitation

Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.

@juanarbol
juanarbol / chmodCheatSheet.md
Last active April 10, 2024 19:17
Chmod cheat sheet

Chmod codes cheat sheet

How to use chmod codes in UNIX:

  1. There are three types of permissions in files and folders in unix
    1. Read (r)
    2. Write (w)
    3. Execute (x)
  2. And, there is a classification of users called UGO (explained bellow):
  3. U ~> User (usually, you)
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 3, 2024 16:53
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'