Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rampfox
rampfox / increase SWAP size in Raspberry Pi.md
Created June 24, 2022 02:40
tutorial How increase SWAP memory size in Raspberry Pi

increase SWAP size in Raspberry Pi

What is SWAP memory?

SWAP memory is basically parts of memory from the RAM (Random Access Memory) that enables an operating system to provide more memory to a running application or process than is available in physical random access memory (RAM). So if the physical memory (RAM) is full, we can use SWAP partition for extra memory resources. It is useful if we have low memory on our machine.

Step 1: Stop the SWAP

sudo dphys-swapfile swapoff
@chrisveness
chrisveness / crypto-aes-gcm.js
Last active May 6, 2024 19:16
Uses the SubtleCrypto interface of the Web Cryptography API to encrypt and decrypt text using AES-GCM (AES Galois counter mode).
/**
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt().
* (c) Chris Veness MIT Licence
*
* @param {String} plaintext - Plaintext to be encrypted.
* @param {String} password - Password to use to encrypt plaintext.
* @returns {String} Encrypted ciphertext.
*
* @example
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw');
@arilivigni
arilivigni / ci-workflow-defaults.yml
Last active May 6, 2024 19:16
Jenkins Job Builder Example
- defaults:
name: ci-workflow-provision
description: |
Managed by Jenkins Job Builder. Do not edit via web.
concurrent: true
scm:
- git:
url: 'https://code.engineering.redhat.com/gerrit/ci-ops-central'
branches:
- origin/master
@JohannesMP
JohannesMP / EnableDiscordDevExperiments.md
Last active May 6, 2024 19:15 — forked from ExordiumX/betaenabler.js
Enabling Discord Dev Experiments on Discord for Windows (2022-02)

Enable Dev Experiments in Discord for Windows

image

This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).

This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.


@wojteklu
wojteklu / clean_code.md
Last active May 6, 2024 19:14
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

@androidfred
androidfred / haskell_stack_and_intellij_idea_ide_setup_tutorial_how_to_get_started.md
Last active May 6, 2024 19:13
Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Upon completion you will have a sane, productive Haskell environment adhering to best practices.

Basics

  • Haskell is a programming language.
  • Stack is tool for Haskell projects. (similar tools for other languages include Maven, Gradle, npm, RubyGems etc)
  • Intellij IDEA IDE is a popular IDE.

Install required libraries

sudo apt-get install libtinfo-dev libghc-zlib-dev libghc-zlib-bindings-dev

@sjimenez44
sjimenez44 / TimeZone.md
Created September 8, 2021 19:19
Change time zone Docker container

Change TimeZone in Docker containers

With Docker Engine

The timezone of a container can be set using an environment variable in the docker container when it is created. For example:

$ docker run ubuntu:latest date
Sat Feb 27 15:58:32 UTC 2021
$ docker run -e TZ=America/Bogota ubuntu:latest date
Sat Feb 27 15:58:40 Asia 2021
@LunaCodeGirl
LunaCodeGirl / examples.sh
Created September 25, 2013 23:39
Figlet how to and examples
figlet "I've got something to say"
figlet -f thick "Make Tech ASCIIer"
date | figlet -f basic
@sergiobd
sergiobd / Dockerfile
Created September 4, 2023 07:46
Dockerfile for 3D Gaussian splatting
## Unofficial Dockerfile for 3D Gaussian Splatting for Real-Time Radiance Field Rendering
## Bernhard Kerbl, Georgios Kopanas, Thomas Leimkühler, George Drettakis
## https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
# Use the base image with PyTorch and CUDA support
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel
# NOTE:
# Building the libraries for this repository requires cuda *DURING BUILD PHASE*, therefore: