Skip to content

Instantly share code, notes, and snippets.

View michezio's full-sized avatar
🛸
Working from space

Michele Abruzzese michezio

🛸
Working from space
View GitHub Profile
@carlos-algms
carlos-algms / spotify adb commands.md
Created June 4, 2021 09:42
Control Spotify via ADB commands

Control Spotify via ADB commands

Working:

Open a specific playlist in Spotify via ADB:

adb am start -a android.intent.action.VIEW spotify:playlist:4bfj9Go9YnSq7L4YeWTWeY:play
@fay59
fay59 / Quirks of C.md
Last active April 3, 2025 02:27
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@beesandbombs
beesandbombs / evilTriangles.pde
Created January 8, 2018 23:58
evil triangles
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@abinashmeher999
abinashmeher999 / comp_macros.h
Created July 27, 2015 13:19
Some of the most used macros in competitive programming
#include <cmath>
#include <climits>
#include <queue>
#include <vector>
#include <map>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream> // istringstream buffer(myString);
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//