Skip to content

Instantly share code, notes, and snippets.

View manvscode's full-sized avatar
💭
Coding.

Joe Marrero manvscode

💭
Coding.
View GitHub Profile
@manvscode
manvscode / rpi_dwm.md
Created March 3, 2023 04:24 — forked from luk707/rpi_dwm.md
Setting up DWM on a Raspberry Pi running Raspbian lite

Setting up DWM on a Raspberry Pi running Raspbian lite

Make sure git is intalled

sudo apt install git

Clone the repository from suckless:

@manvscode
manvscode / CDN.md
Created July 18, 2020 19:37 — forked from vinkla/CDN.md
A guide on how to upload images to GitHub's CDN through issues and pull requests.

Upload Images to GitHub's CDN

  1. First, visit any repository on GitHub and click your way through to the issues page.

  2. Create a new issue by clicking the New Issue button. You'll now see title and description fields.

  3. Drag-and-drop an image onto the description field. This will start the uploading process.

  4. Copy the URL and use it in README, issues or pull requests however you like.

@manvscode
manvscode / effective_modern_cmake.md
Created March 21, 2020 04:49 — forked from mbinna/effective_modern_cmake.md
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

@manvscode
manvscode / .gitconfig
Created December 2, 2019 21:41 — forked from shawndumas/.gitconfig
Using WinMerge as the git Diff/Merge Tool on Windows 64bit
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge
@manvscode
manvscode / docker-cleanup-resources.md
Created November 26, 2019 23:05 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

/// <summary>
/// Fast exponential approximation.
/// </summary>
/// <remarks>
/// Based on "A Fast, Compact Approximation of the Exponential Function" by Nicol N.Schraudolph (1999)
/// <code>e^x ~ a*x + b
/// a = 2 ^ (mantissa bits) / ln(2) ~ 12102203
/// b = (exponent bias) * 2^(mantissa bits) ~ 1065353216</code>
/// </remarks>
/// <param name="x">A number specifying a power.</param>
@manvscode
manvscode / BigDecimal.cs
Created April 8, 2019 04:43 — forked from JcBernack/BigDecimal.cs
BigDecimal
using System;
using System.Numerics;
namespace Common
{
/// <summary>
/// Arbitrary precision decimal.
/// All operations are exact, except for division. Division never determines more digits than the given precision.
/// Source: https://gist.github.com/JcBernack/0b4eef59ca97ee931a2f45542b9ff06d
/// Based on https://stackoverflow.com/a/4524254
@manvscode
manvscode / default.conf
Created April 30, 2017 12:30
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;
@manvscode
manvscode / gdbinit
Last active August 29, 2015 14:17 — forked from CocoaBeans/gdbinit
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net