Skip to content

Instantly share code, notes, and snippets.

View wcasanova's full-sized avatar
🏠
Working from home

Walter C wcasanova

🏠
Working from home
  • CL, Stgo
View GitHub Profile
@wcasanova
wcasanova / nmap_examples.md
Created October 9, 2020 18:52 — forked from rsperl/nmap_examples.md
nmap examples
@wcasanova
wcasanova / fix-webcams.sh
Created August 28, 2020 18:02 — forked from shimon/fix-webcams.sh
Linux shell script to disable an internal webcam if an external one is attached, or enable the internal one if not.
#!/bin/bash
# Quick script to disable an internal webcam if an external one is attached, or
# enable the internal one if the external one's not attached.
# by Shimon Rura, 25 Jan 2018. In the public domain.
# To use, run `lsusb` and identify the lines for your internal and external camera devices.
# For example, mine are:
# internal:
@wcasanova
wcasanova / HelloTriangle.cc
Created August 2, 2020 17:57 — forked from Overv/HelloTriangle.cc
Vulkan hello triangle
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <chrono>
#include <functional>
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>

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

@wcasanova
wcasanova / kakrc
Created July 9, 2020 15:55 — forked from jwhett/kakrc
Kakrc
colorscheme desertex
###########
# Plugins #
###########
source "%val{config}/plugins/plug.kak/rc/plug.kak"
plug "andreyorst/plug.kak" branch "dev" noload
plug "andreyorst/fzf.kak"
plug "occivink/kakoune-sudo-write"
@wcasanova
wcasanova / postgres-cheatsheet.md
Created July 2, 2020 23:04 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@wcasanova
wcasanova / luks_on_lvm_arch_linux_guide.sh
Created June 26, 2020 02:33 — forked from ddnomad/luks_on_lvm_arch_linux_guide.sh
Arch Linux installation with a full-disk encryption (LUKS on LVM)
###############################################################################
# Author: ddnomad
# Version: 1.1.2
# Last Update: 2020-06-16
#
# External contributors:
# - u/momasf (https://www.reddit.com/user/momasf) - an excellent
# tip to use 'reflector' to speed up downloads during the base
# installation
# - eXhumer (https://github.com/eXhumer) - Fixes for things that
@wcasanova
wcasanova / curl.md
Created June 7, 2020 16:57 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@wcasanova
wcasanova / docker-compose.yml
Created May 20, 2020 19:45 — forked from kanzitelli/docker-compose.yml
Docker Compose file for Traefik v2.0 deployed on Digital Ocean with https available
version: '3'
services:
reverse-proxy:
image: traefik:v2.0
restart: always
container_name: traefik
command:
- "--api=true"
- "--providers.docker=true"