Skip to content

Instantly share code, notes, and snippets.


Manu Sánchez Manu343726

View GitHub Profile
aeschright /
Last active Jul 27, 2019
A note about npm cli work status

When will npm@6.9.1 be released (and other PRs merged?)

On March 22, npm fired several members of the open source and community team for discussing workplace conditions and other labor organizing activities. As a result, core employee contributors to the npm cli were removed from the project, and others have left in solidarity or put their work on hold.

Multiple claims were filed with the NLRB on this matter. The NLRB has investigated and found sufficient evidence of validity to proceed. The National Labor Relations Act of 1935 protects US employees' right to engage in discussions of workplace concerns without threat of retaliation -- and awareness of the importance of how we treat each other is something I valued so much in collaborating with the cli team. How can we work together if we aren't free to discuss what we need?

It's disappointing for all of us to find the work we were doing interrup

shafik /
Last active Jun 14, 2021
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

dannguyen /
Last active Feb 26, 2021
A command-line function that runs a SQLite query and gets a Markdown-ready table; See console demo at
### sqlmd
# Bash function for outputting SQLite results in Markdown-friendly table
### Dependency:
# csvlook can be found here:
# $ sqlmd "SELECT name, age FROM people;" optional_db_name_argument.sqlite
View integral_variable.cpp
#include <utility>
#include <iostream>
#include <cstddef>
namespace atch { namespace {
template<class Tag>
struct meta_counter {
using size_type = std::size_t;
template<size_type N>

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

dwilliamson /
Last active Apr 2, 2021
Minimal Code Generation for STL-like Containers

This is my little Christmas-break experiment trying to (among other things) reduce the amount of generated code for containers.


The C++ STL is still an undesirable library for many reasons I have extolled in the past. But it's also a good library. Demons lie in this here debate and I have no interest in revisiting it right now.

The goals that I have achieved with this approach are:

View xxhash32_constexpr.cpp
// A C++11 constexpr implementation of xxhash32
// Jonathan Adamczewski /
// A reimplementation of code from
// Foundation functions / commonly used patterns
// Read four chars and construct uint32_t (little endian)
constexpr uint32_t xxh_read32(const char* input)
bishboria /
Last active Jun 13, 2021
Springer made a bunch of books available for free, these were the direct links
View gist:15e4f2e48f2a746ee256
// Myth #1: constexpr is the same as const
// (note: there is a difference between C++11 and C++14 here)
// (see:
namespace myth1 {
struct foo {
int i;
constexpr int& get() { return i; } // not a const function
int f() {