Skip to content

Instantly share code, notes, and snippets.

View dsaw's full-sized avatar

देवेश (devesh) dsaw

View GitHub Profile
@cellularmitosis
cellularmitosis / README.md
Last active May 7, 2022 07:51
Common Lisp Notes
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@ibLeDy
ibLeDy / fix_black_screen_on_second_monitor.patch
Last active December 20, 2023 11:23
Fix for second monitor with blank screen (Ubuntu 20.04 - HP Pavilion Gaming Laptop 15-ec1xxx, Nvidia GTX 1650, Ryzen 5 4600H)
diff --git a/10-amdgpu.conf b/10-amdgpu.conf
index ef20256..c86f77a 100644
--- a/10-amdgpu.conf
+++ b/10-amdgpu.conf
@@ -1,5 +1,5 @@
Section "OutputClass"
Identifier "AMDgpu"
MatchDriver "amdgpu"
- Driver "amdgpu"
+ Driver "modesetting"
@vindarel
vindarel / Common Lisp VS Racket - testimonies.md
Last active April 20, 2024 03:18
Common Lisp VS Racket. Feedback from (common) lispers.

Developer experience, libraries, performance… (2021/11)

I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain

  1. SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
  2. Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
  3. Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI

Now as to why Common Lisp over Scheme

@Einstrasse
Einstrasse / bits-stdc++.h
Created December 3, 2019 14:52
bits/stdc++.h header file
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@pavlin-policar
pavlin-policar / max_heap.py
Created November 22, 2018 11:11
Python implementation of max heap/priority queue
class MaxHeap:
def __init__(self, collection=None):
self._heap = []
if collection is not None:
for el in collection:
self.push(el)
def push(self, value):
self._heap.append(value)
@devloco
devloco / download-pdf.js
Last active January 10, 2024 11:09
Download a PDF via POST with Fetch API
let fnGetFileNameFromContentDispostionHeader = function (header) {
let contentDispostion = header.split(';');
const fileNameToken = `filename*=UTF-8''`;
let fileName = 'downloaded.pdf';
for (let thisValue of contentDispostion) {
if (thisValue.trim().indexOf(fileNameToken) === 0) {
fileName = decodeURIComponent(thisValue.trim().replace(fileNameToken, ''));
break;
}
@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@kdevo
kdevo / IntelliJ + Maven - Unresolved Plugin.md
Last active March 1, 2024 09:03
IntelliJ IDEA and Maven - "Unresolved Plugin" notes