Skip to content

Instantly share code, notes, and snippets.

#ifndef C_MOST_USEFUL_EXTENSION_EVER
#define C_MOST_USEFUL_EXTENSION_EVER
class _t{
public:
static int _count;
_t(){};
virtual ~_t(){};
friend const void operator+(const int n, const _t t){_count=n;}
};
int _t::_count=0;
@Killeroid
Killeroid / gpg-import-and-export-instructions.md
Created October 18, 2017 11:51
How to export and import gpg keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Gotten from the RedHat GPG migration manual

Backup the public and secret keyrings and trust database

## Export all public keys

gpg -a --export >mypubkeys.asc

# configure git credentials manager to work with GPG
# usefull for sessions without GUI
# https://github.com/GitCredentialManager/git-credential-manager
# https://github.com/GitCredentialManager/git-credential-manager/blob/main/docs/credstores.md#gpgpass-compatible-files
# install pass
sudo apt install pass
# generate gpg key pair
@gabolopez90
gabolopez90 / SQL.md
Last active April 16, 2024 18:10
Apuntes de SQL

SQL

SQL (por sus siglas en inglés Structured Query Language; en español lenguaje de consulta estructurada) es un lenguaje específico del dominio que da acceso a un sistema de gestión de bases de datos relacionales que permite especificar diversos tipos de operaciones en ellos.

Nota: En SQL es una convención escribir los comandos en mayúsculas y las variables, etc en minúsculas.

COMANDOS BÁSICOS DE SQL

Crear nueva tabla

@dehsilvadeveloper
dehsilvadeveloper / nvm-commands.md
Last active April 16, 2024 18:11
Useful NVM commands

Versions check

Check Node version:

node -v or node --version

Check NPM version:

npm -v

@milkaxq
milkaxq / main.go
Created April 16, 2024 15:43
From array of not nested json to nested
package main
import (
"encoding/json"
"fmt"
)
type Service struct {
ID int `json:"id"`
Service string `json:"service"`
@michaelbutler
michaelbutler / Steam_Proton_Exe.md
Last active April 16, 2024 18:08
How to run another .exe in an existing proton wine prefix

Running games through Steam's Proton is great. But what if there is a secondary exe or configuration application bundled with the game? How can you launch it if Steam itself only launches the game?

Simply run this command in a terminal:

cd /path/to/steam/steamapps/compatdata/20920/pfx

STEAM_COMPAT_DATA_PATH="/path/to/steam/steamapps/compatdata/20920" WINEPREFIX=$PWD \
    "$HOME/.steam/root/steamapps/common/Proton 5.0/proton" run ./drive_c/path/to/custom_application.exe
@HimDek
HimDek / Install Windows Subsystem for Android on any Edition of Windows 11 non Insider.md
Last active April 16, 2024 18:06
This Guide will show you how to Install Windows Subsystem for Android or WSA on any Edition of Windows 11 non Insider release.

Install Windows Subsystem for Android on Windows 11 non Insider

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow this guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • A Device with any version and Edition of Windows 11 installed.
  • Internet Connection.
  • Hyper-V enabled.

Enable Hyper-V:

@disler
disler / README.md
Last active April 16, 2024 18:06
Personal AI Assistant: 'Ada' - v0

This is not working complete code.

This is strictly a v0, scrapy, proof of concept for the first version of a personal AI Assistant working end to end in just ~322 LOC.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

Stay focused, keep building.

@bradtraversy
bradtraversy / terminal-commands.md
Last active April 16, 2024 18:04
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen