Skip to content

Instantly share code, notes, and snippets.

View hrnn's full-sized avatar

Hernan Payrumani hrnn

View GitHub Profile

Twitter abuses all media file uploads, each type in its own way. If we want to upload a good looking animation loop from some low-color, high-detail generative art, we have to game their system's mechanisms.

  • don't upload a video file, they will re-encode it into absolute 💩

  • create a GIF, which they will auto-convert into a video file 😱

  • The frames of the GIF will be resized to an even-sized width using an extremely naive algorithm. Your GIF should be an even size (1000, 2000,

@Iridium-IO
Iridium-IO / README.md
Last active January 30, 2024 10:36
Collapsible Markdown Code Blocks

Example Collapsible Content

Style 1

Click to see more:
Given the following python code
from pychartjs import BaseChart

class myChart(BaseChart):

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

@koenrh
koenrh / proxify-vmware-fusion-vm.md
Created July 8, 2019 15:41
This is a little guide that helps you to "proxify" a VMware Fusion virtual machine on macOS. This can be useful if you want to isolate and analyse web traffic to/from an application by running it in a VM.

Proxifying a VMware Fusion virtual machine on macOS

This is a little guide that helps you to "proxify" a VMware Fusion virtual machine on macOS. This can be useful if you want to isolate and analyse web traffic to/from an application by running it in a VM.

Prerequisites

  • VMware Fusion 11 Pro
  • Transparent HTTP/HTTPS proxy (e.g. Burp Suite Pro or mitmproxy)
@ramantehlan
ramantehlan / README-Fancy.md
Last active April 22, 2024 13:53
README template I use for most of my projects.

Introduction

  • Add your project logo.
  • Write a short introduction to the project.
  • If you are using badges, add them here.

📒 Index

@avoidik
avoidik / README.md
Created October 29, 2018 07:37
AWS query examples

Top 10 Examples of AWS CLI Query

List Volumes showing attachment using Dictionary Notation

$ aws ec2 describe-volumes \
  --query 'Volumes[*].{ID:VolumeId,InstanceId:Attachments[0].InstanceId,AZ:AvailabilityZone,Size:Size}'
[
    {
        "InstanceId": "i-a071c394",

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@sindresorhus
sindresorhus / writing-eslint-rule.md
Last active February 26, 2023 03:01
Gettings started writing a ESLint rule

Gettings started writing a ESLint rule

First, take a look at the ESLint rule documentation. Just skim it for now. It's very long and boring. You can come back to it later.

ESLint rules works on the AST (Abstract Syntax Tree) representation of the code. In short, this is a tree structure that describes the code in a very verbose form. ESLint walks this tree and rules can subscribe to be notified when it hits a specific node type, like a Literal type, which could be the "hello" part of const welcome = "hello";.

Go ahead and play around with some code in AST Explorer (Make sure the parser is espree). It's a great tool!

Here are some good articles on the subject (ignore the scaffolding parts):

@Rich-Harris
Rich-Harris / footgun.md
Last active April 19, 2024 07:47
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

@AndreasS2501
AndreasS2501 / Blockchains.md
Last active September 19, 2018 14:32
How to think an impossible thought?

On Blockchains - Postcapitalism - in response to: Postcapitalism by Jamie Dobson https://www.youtube.com/watch?v=MGdQnL4-H9M

An impossible thought?

But what do we want to think? I think many people want the same thing (see maslov pyramid of needs). But the ever interesting question in the history of humanity was: How to do that so that there exists an equilibrium between all humans (society) and the rest of the planet (nature). Personally I see post-capitalism as a part of a solution for that, but economy is only one thing that should change. To conceive such a complex balance is not a simple thing. Alan Kay often talks about how the internet has some biological ideas in it and yes I think to achieve that balance we need some kind of network organism where everyone is connected and heard. Even nature. So lets focus on that, the impossible thought: How can we live together in peace and prosperity with each other and nature? Sometimes, somehow this reminds me of the https://en.wikipedia.org/wiki/K