Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@sarfarazahmad89
sarfarazahmad89 / 0001-patch-from-gmires.patch
Created December 23, 2023 17:46
Slim 7 16APH8 Audio on Linux-6.6.0
From 6ee3013cdb3fd750fdbe175f275214fbfc3b3992 Mon Sep 17 00:00:00 2001
From: nobody <nobody@nobody.com>
Date: Sat, 23 Dec 2023 17:29:23 +0100
Subject: [PATCH 1/3] patch from gmires
---
sound/pci/hda/cs35l41_hda_property.c | 7 +++++++
sound/pci/hda/patch_realtek.c | 30 +++-------------------------
2 files changed, 10 insertions(+), 27 deletions(-)
@abotiaz
abotiaz / fbcookielogin.js
Created November 14, 2022 09:16 — forked from silverwolfceh/fbcookielogin.js
Login facebook = cookie
javascript:void(function() { function setCookie(t) { var list = t.split("; "); console.log(list); for (var i = list.length - 1; i >= 0; i--) { var cname = list[i].split("=")[0]; var cvalue = list[i].split("=")[1]; var d = new Date(); d.setTime(d.getTime() + (7*24*60*60*1000)); var expires = ";domain=.facebook.com;expires="+ d.toUTCString(); console.log(expires); document.cookie = cname + "=" + cvalue + "; " + expires; } } var cookie = prompt("Input your cookie below", ""); setCookie(cookie); document.location.href="https://www.facebook.com";})();
@seanislegend
seanislegend / map-reverse.scss
Created November 19, 2014 14:00
Reverse the order of a SASS map.
@function mapReverse ($map) {
$result: null;
@if type-of($map) == "map" {
$keys: map-keys($map);
$map-reversed: ();
@for $i from length($keys) through 1 {
$map-reversed: map-merge(
$map-reversed,
@jackblk
jackblk / LogitechF310_Macbook.MD
Created April 13, 2021 16:07
Getting Logitech F310 to work with Macbook USB-C port

Connect & use Logitech F310 with Macbook

Since my Macbook Pro only has USB-C port, I used an USB-A to USB-C adapter to connect my F310 to it, but it does not work (pressing MODE button does not turn on the LED).

How to

To make it work:

  • Disconnect F310 from Mac
  • On F310: switch X-input to D-input
  • Hold Logitech button (in the middle)
  • Connect F310 to Mac via adapter, now you can release the Logitech button.
@nandorojo
nandorojo / private-npm-in-gh-actions.md
Created August 3, 2021 23:52
Use private NPM packages in your GitHub actions

1 NPM_TOKEN

Add an NPM_TOKEN secret on GitHub. Get your secret key from the NPM dashboard.

2 Add a step to your action

- name: Authenticate with private NPM package
  run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
@di
di / tlds
Created December 4, 2014 20:01
Valid Two-Letter Top Level Domains
ac
ad
ae
af
ag
ai
al
am
an
ao
@vasanthk
vasanthk / System Design.md
Last active May 1, 2024 06:11
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@sagebind
sagebind / zombie-war.cpp
Created January 10, 2014 17:32
A simple game in C++ for a class exercise.
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
using namespace std;
int createZombie() {
if (rand() % 67 < 10)
return 11;

kaths-bookshelf

There's a lot of recommended reading for product managers out there. Some of it is incredibly useful, and some of it is a waste of time. Business books don't really get me excited, but there are a few books, articles, newsletters, and podcasts authored by folks I look up to in the industry that I find myself coming back to often. When you're reading about product management, it's important to take everything with a grain of salt. The industry changes rapidly, and so does the discipline. If you learn something you want to try out from one of these books, go for it! But be careful not to whiplash yourself or your team.

I find new books and articles all the time, so I'm going to start dropping them here. Hope they help and inspire some other Product folks!

Books

Delivering Happiness by Tony Hsieh

Learning about how others have launched successful products and companies is definite