Skip to content

Instantly share code, notes, and snippets.

@kwahoo2
kwahoo2 / gamepad-navigation.py
Created October 20, 2024 21:42
Python script for navigating FreeCAD view with a gamepad
# move FreeCAD camera with a gamepad
import ctypes
import time
from sdl2 import *
from pivy.coin import SbVec3f, SbRotation
from PySide import QtCore
from math import pi
@rougier
rougier / make-tab-box.el
Created May 19, 2024 19:52
Emacs box with tabs
;;; make-tab-box.el --- Box with tabs -*- lexical-binding: t -*-
;; Copyright (C) 2024 Nicolas P. Rougier
;; Maintainer: Nicolas P. Rougier <[email protected]>
;; Version: 0.1.0
;; Package-Requires: ((emacs "27.1"))
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@pmbaumgartner
pmbaumgartner / docx-cli-search.md
Created July 19, 2021 15:17
Search the contents of Word docs via CLI

Search Contents of Word Documents from the Terminal

You'll need ripgrep and pandoc to get started. You can read more about ripgrep here and pandoc here. I use both of these frequently and they're quite helpful.

You can install them both with homebrew:

brew install pandoc ripgrep
@daniestevez
daniestevez / gnuradio-m1-macs.md
Created June 15, 2021 20:36
GNU Radio in M1 Macs (with Docker Desktop)

GNU Radio in M1 Macs (with Docker Desktop)

This note describes the steps we took with the SETI Institute summer interns 2021 to install GNU Radio in their M1 Macs (MacBook Air M1 2020 model). We used gnuradio-docker-env as a starting point, which was of invaluable help.

There might be omissions, typos, etc., in this note, so any feedback is welcome. The procedure could also be streamlined a lot by generating known-good images and pushing the to Docker Hub.

XQuartz

@volfegan
volfegan / circle.pde
Last active March 15, 2021 20:40
Bubbles drifting with circle packing algorithm
// author Volfegan [Daniel L Lacerda]
import java.lang.Math;
import java.util.Random;
public class Circle {
public float x, y, r, colour, angle;
public Circle(float x, float y, float r) {
this.x = x;
this.y = y;
@rougier
rougier / agenda.py
Last active December 14, 2023 19:47
org-mode agenda calendar in the terminal
#!/usr/bin/env python3
# Copyright 2020 Nicolas P. Rougier - BSD License
#
# from reading org-mode emacs files, display a formated calendar in the
# terminal showing holidays and busy days and upcomiing events.
import holidays # https://pypi.org/project/holidays/
import calendar
import datetime
import orgparse # https://pypi.org/project/orgparse
@marcedwards
marcedwards / splitlines.pde
Last active April 9, 2021 19:07
Split Lines in Processing
//
// Split Lines.
// Created using Processing 3.5.3.
//
// Code by @marcedwards from @bjango.
//
// A GIF of this code can be seen here:
// https://twitter.com/marcedwards/status/1212718884224040965
//
// Very, very, very heavily inspired by this animation:
import java.util.UUID;
ArrayList<P> ps = new ArrayList<P>();
int pointCount = 1000;
PImage source;
private float t;
private int framesToCapture = 300;
private int captureStart = -1;
String id = "";
@MattPD
MattPD / cpp.std.coroutines.draft.md
Last active April 10, 2025 13:50
C++ links: Coroutines (WIP draft)
@pvik
pvik / smartparens-cheatsheet.md
Last active December 16, 2024 17:54
A Cheatsheet for Emacs Smarparens example configuration

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.

Traversal

C-M-f sp-forward-sexp
C-M-b sp-backward-sexp