Skip to content

Instantly share code, notes, and snippets.

@eneko
eneko / list-of-curl-options.txt
Last active April 18, 2024 19:30
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@Haaroon
Haaroon / fallout new vegas steam deck mod guide.md
Last active April 18, 2024 19:28
how to install fallout new vegas on steam deck and install mods
@mbinna
mbinna / effective_modern_cmake.md
Last active April 18, 2024 19:26
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@subfuzion
subfuzion / global-gitignore.md
Last active April 18, 2024 19:25
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@miguelmota
miguelmota / notes.txt
Last active April 18, 2024 19:25
arch linux arch-chroot fix /boot initramfs (ie failed update/upgrade)
1. install usb stick with arch linux
2. boot from usb
3. run `fdisk -l` to find partition with linux installation (ie /dev/sda3 Linux Filesystem)
4. mount partition: `mount /dev/sda3 /mnt`
5. arch chroot into it: `arch-chroot /mnt`
6. rebuild initramfs: `mkinitcpio -p linux` (if that doesn't work yes try `pacman -S linux` only)
7. shutdown, unplug usb, reboot
@qoomon
qoomon / conventional_commit_messages.md
Last active April 18, 2024 19:22
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@Klerith
Klerith / configurar-node-ts.md
Last active April 18, 2024 19:22
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
@leonirlopes
leonirlopes / mask.php
Created April 20, 2018 19:32
Máscara PHP para CNPJ, CPF, Data e qualquer outra coisa
<?php
// PHP Máscara CNPJ, CPF, Data e qualquer outra coisa
// http://blog.clares.com.br/php-mascara-cnpj-cpf-data-e-qualquer-outra-coisa/
// ver em funcionamento ~~> https://ideone.com/wP7zN2
function mask($val, $mask)
{
$maskared = '';
$k = 0;
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@reallytiredofclowns
reallytiredofclowns / discuitstats.py
Last active April 18, 2024 19:20
Discuit activity summary script
# to do: error checking/resumption code (can use pagination cursor of post to determine when script paused?)
# clean up repetition
# timing issue: if fetching by latest, someone can make a comment
# that puts a post out of the date limits before the looping
# has a chance to fetch the post
# do a second sweep after hitting the date limit?
# would have to store the script's start time and figure out
# when it halts due to hitting the lower date limit and
# reprocess comments according to that...