Skip to content

Instantly share code, notes, and snippets.

View xtrm-en's full-sized avatar
💭
haha cloud

killian. xtrm-en

💭
haha cloud
View GitHub Profile
@starwing
starwing / normpath.c
Last active July 7, 2024 13:05
a path normalize algorithm
#include <stdio.h>
#include <string.h>
#define COMP_MAX 50
#define ispathsep(ch) ((ch) == '/' || (ch) == '\\')
#define iseos(ch) ((ch) == '\0')
#define ispathend(ch) (ispathsep(ch) || iseos(ch))
char *normpath(char *out, const char *in) {
@skyecodes
skyecodes / hide_tweet_views.md
Last active February 1, 2023 16:57
How to hide Twitter view count on web browser

How to hide Twitter view count on web browser

  • Requires uBlock Origin browser extension
  • In uBlock Origin settings, "My Filters" tab, paste this code at the end of the file:
! Hide tweet views
twitter.com##.css-1dbjc4n.r-1ta3fxp.r-18u37iz.r-1wtj0ep.r-1s2bzr4.r-1mdbhws > div:nth-child(4)
twitter.com##.css-1dbjc4n.r-1d09ksm.r-1471scf.r-18u37iz.r-1wbh5a2 > :not(:nth-child(1))

! Hide "Twitter Blue" menu
@gangsta
gangsta / jq-examples.md
Last active April 15, 2024 21:48
Mastering JSON Parsing with jq: A Comprehensive Guide for Time and Date Range Filters in API Data Processing with Bash

Welcome! If you're here, chances are you've made an API call, and it's returning JSON data that you want to parse using a jq script. Let's work through it together.

Whether you're a seasoned developer or just starting out, this blog is your go-to resource for mastering the art of JSON parsing with jq. Specifically, if you're searching for insights on how to efficiently filter and process date ranges, you've come to the right place.

Explore topics such as 'jq filter date range', 'jq how to select date range', 'jq filter selected date range', "How to select a date range from a JSON string by using jq", "jq between two dates" and more. Whether you're looking to filter records in the future, select last week's records, or retrieve emails from a specific timeframe using jq, this blog provides a comprehensive guide to help you navigate the intricacies of JSON parsing with precision.

Let's dive into the world of jq and together, master the art of effortlessly filtering and selecting date ranges!

JSON example