Skip to content

Instantly share code, notes, and snippets.

View hugows's full-sized avatar
🏠
Working from home

Hugo Schmitt hugows

🏠
Working from home
View GitHub Profile

For a while, I thought that our modern culture's relationship to science best resembled the Catholic Church during the middle ages. Priests delivering sermons in Latin, indulgences, poor families of believers praying one of their sons would be bright enough for the clergy... Then I discovered the Druze.

"But when I asked him about the Druze faith, he gave me an unexpected reply. 'I know nothing about the Druze', the pre-eminent leader of the Druze declared with a violent wave of his arm. From his piles of books he selected a couple by Tariq Ali and gave them to me as gifts. He invited me to visit him at his palace in the mountains. And then he said goodbye. Either the most powerful Druze man in Lebanon, an intellectual in his own right, had been excluded from the teachings of his own religion, or else he knew better than to pass them on to an outsider. I had every intention of taking up his invitation to spend time among the Druze communities, but first I would have to find someone more willing to talk

@lattner
lattner / TaskConcurrencyManifesto.md
Last active June 1, 2024 06:16
Swift Concurrency Manifesto
@magbicaleman
magbicaleman / index.js
Last active May 6, 2020 19:21
Crude Dynamic Import Example on Create React App index.js scaffold
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import registerServiceWorker from './registerServiceWorker';
class Dynamic extends Component {
constructor(props) {
super(props);
this.state = { module: null };
}
@gaearon
gaearon / MyResponsiveComponent.js
Created November 1, 2018 10:05
Examples from "Making Sense of React Hooks"
function MyResponsiveComponent() {
const width = useWindowWidth(); // Our custom Hook
return (
<p>Window width is {width}</p>
);
}
@d7samurai
d7samurai / .readme.md
Last active May 31, 2024 15:26
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube

hollowcube

Also check out Minimal D3D11 pt2, reconfigured for instanced rendering and with a smaller, tighter, simplified overall code structure, or Minimal D3D11 pt3, with shadowmapping + showcasing a range of alternative setup and rendering techniques.

@jarek-przygodzki
jarek-przygodzki / rob-pike-comments.md
Last active September 9, 2022 08:33
Rob Pike on commnts

Comments

A delicate matter, requiring taste and judgement. I tend to err on the side of eliminating comments, for several reasons. First, if the code is clear, and uses good type names and variable names, it should explain itself. Second, comments aren't checked by the compiler, so there is no guarantee they're right, especially after the code is modified. A misleading comment can be very confusing. Third, the issue of typography: comments clutter code.

Rob Pike, "Notes on Programming in C"

@knu
knu / barrier_karabiner.lua
Last active April 26, 2024 17:58
Barrier and Karabiner-Elements integration using Hammerspoon
knu = require("knu") -- https://github.com/knu/hs-knu
-- Switch between Karabiner-Elements profiles as Barrier enters a different host
do
-- Configure Barrier (https://github.com/debauchee/barrier) to output log to ~/Library/Logs/barrier.log
local logFile = os.getenv("HOME") .. "/Library/Logs/barrier.log"
local lineNo = 1
local host = nil
local defaultProfile = "Default"
local profileForHost = function (host)
@IcedMango
IcedMango / karabiner_double_tap_toggle_raycast.json
Last active November 10, 2023 11:26
Enable double tap cmd/option toggle for Raycast using karabiner
{
"title": "Raycast Karabiner Config",
"rules": [
{
"description": "Double click cmd Toggle Raycast(Hotkey: ctrl+option+cmd+Esc)",
"manipulators": [
{
"conditions": [
{
"name": "command_pressed",
@sibelius
sibelius / woovi_challenge.md
Last active May 2, 2024 03:03
Woovi Challenge