Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 7, 2024 11:52
set -e, -u, -o, -x pipefail explanation
@Arian04
Arian04 / shell.nix
Last active May 7, 2024 11:51 — forked from Nadrieril/shell.nix
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 21.0 for redfin (Google Pixel 5)
#
# IMPORANT NOTE: I had to use a pure shell for my builds to work, i.e: `nix-shell --pure` rather than `nix-shell`
#
# The build instructions are here: https://wiki.lineageos.org/devices/redfin/build
#
# Warning (from forked gist, was added August 1st 2018):
# The hardened NixOS kernel disables 32 bit emulation, which made me run into multiple "Exec format error" errors.
# To fix, use the default kernel, or enable "IA32_EMULATION y" in the kernel config.
#
@devomman
devomman / office-activation.md
Created May 30, 2023 11:01
Office Activation Command by Omman

Office 2021

Method 1: Using my command line

Step 1.1: Open cmd program with administrator rights.

  • First, you need to open cmd in the admin mode, then run all commands below one by one.

Step 1.2: Get into the Office directory in cmd.

  • For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
@awesomebytes
awesomebytes / simple_debian_repository.md
Last active May 7, 2024 11:50
How to create a simple debian repository with minimal dependences

Simple debian repository

How to have a simple debian repository to offer your packages.

Requirements

You probably have them already installed

  • Python (I used 2.7).
  • dpkg-scanpackages: sudo apt-get install dpkg-dev
  • gzip: sudo apt-get install gzip
@awesomebytes
awesomebytes / debian_from_ros_pkg.md
Last active May 7, 2024 11:50
How to create a debian from a ROS package
@mosquito
mosquito / README.md
Last active May 7, 2024 11:49
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active May 7, 2024 11:49
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@gdurastanti
gdurastanti / parallels-reset.sh
Created August 9, 2017 14:00
Reset Parallels' trial
#!/bin/sh
# Reset Parallels Desktop's trial and generate a casual email address to register a new user
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml
jot -w pdu%d@gmail.com -r 1
@wojteklu
wojteklu / clean_code.md
Last active May 7, 2024 11:48
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@StevenTCramer
StevenTCramer / Dotnet_Background_Jobs
Last active May 7, 2024 11:48
If you are queuing background jobs/work items today in your .NET applications, how are you doing it and what are you using it for?
David Fowler πŸ‡§πŸ‡§πŸ‡ΊπŸ‡ΈπŸ’‰πŸ’‰πŸ’‰ on Twitter: "If you are queuing background jobs/work items today in your .NET applications, how are you doing it and what are you using it for? #dotnet #aspnetcore" / Twitter
https://twitter.com/davidfowl/status/1442566223099666436
Background tasks with hosted services in ASP.NET Core | Microsoft Docs
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-6.0&tabs=visual-studio
Messaging that just works β€” RabbitMQ
https://www.rabbitmq.com/
.NET/C# Client API Guide β€” RabbitMQ