Skip to content

Instantly share code, notes, and snippets.

View basejumpa's full-sized avatar
⌨️

Alexander Mann-Wahrenberg basejumpa

⌨️
  • VITRONIC Group
  • Germany, Wiesbaden
  • 19:04 (UTC +02:00)
  • LinkedIn in/basejumpa
View GitHub Profile
@smrfeld
smrfeld / conf.py
Created June 24, 2020 22:47
Complete conf.py with RTD and Doxygen
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@meatballs
meatballs / anvil_workflow.rst
Last active November 6, 2023 08:26
Anvil Workflow

Anvil Git Workflow

Introduction

This is the workflow I use for anvil apps where I want multiple copies of the app for development and testing purposes or where I want to collaborate with somebody else on its development.

For the purposes of this guide, I'll assume there is an existing app at anvil called 'my-app.' That's already live and it will become the 'production' copy.

Any other copies of the app are for development purposes. They can be created and destroyed as necessary. Their history is not important and can be overwritten.

@vibhoraggarwal
vibhoraggarwal / s-functions-LCT.md
Last active January 5, 2022 02:36
Implementation of S-function
  • The Legacy toolbox can generate, compile and link, and create a masked block for the specified S-function.
  • Legacy Code Tool helps users create S-functions automatically from supplied specifications expressed with MATLAB code

Essential commands

General commands

legacy_code('sfcn_cmex_generate', specs) generates an S-function source file as specified by the Legacy Code Tool data structure, specs.

legacy_code('compile', specs, compilerOptions) compiles and links the S-function generated by the Legacy Code Tool based on the data structure, specs, and compiler options that you might specify. The compiler options must be supported by the mex (MATLAB) function.

// vscode-keybindings for navigation with I/J/K/L and additional functionality with surrounding characters
// Place your key bindings in this file to overwrite the defaults
// ALT + I/J/K/L: up/left/down/right
// ALT + SHIFT + I/J/K/L: mark text up/left/down/right
// CTRL + J/L: send cursor to start/end of line
// CTRL + ALT + J/L: send cursor to start/end of word
// CTRL + ALT + U/O: send cursor to "wordPartLeft"/"wordPartRight"
// CTRL + ALT + SHIFT + U/O: mark from cursor to "wordPartLeft"/"wordPartRight"
// CTRL + ALT + Y: got to declaration
@KCarretto
KCarretto / Makefile
Created December 27, 2018 18:50
Sphinx example. Automatically generate docs and host on github pages.
# FILE LOCATION: <project_root>/docs/Makefile
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
@jonico
jonico / Jenkinsfile.groovy
Created February 19, 2018 16:37
Abbreviated Jenkinsfile to build on multiple archs (from conan.io project)
for (x in slaves) {
def slave = x
for (y in pyvers) {
def pyver = y
builders["${slave} - ${pyver}"] = {
node(slave) {
stage("${slave} - ${pyver}"){
step ([$class: 'WsCleanup'])
checkout scm
def bn = env.BUILD_NUMBER
@ibreakthecloud
ibreakthecloud / github-OAuth.php
Last active December 16, 2019 14:51
Complete PHP 7 code for Implementing OAuth via Github
<?php
session_start();
$code = $_GET['code'];
$url = 'https://github.com/login/oauth/access_token';
$client_id = 'xxxxxxxxxxxxxxxxxxxxxxx';
$client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// echo $code;
$postdata = http_build_query(
@mbinna
mbinna / effective_modern_cmake.md
Last active May 16, 2024 02:57
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@cheungnj
cheungnj / script.sh
Last active March 6, 2024 02:35
Convert asciidoc to Github Flavored Markdown
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1
# Install pandoc and asciidoctor
$ sudo apt install asciidoctor
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb
# Convert asciidoc to docbook using asciidoctor
@ryanoglesby08
ryanoglesby08 / server.js
Last active April 4, 2024 13:25
A node.js SPA server that serves static files and an index.html file for all other routes.
/*
Incredibly simple Node.js and Express application server for serving static assets.
DON'T USE THIS IN PRODUCTION!
It is meant for learning purposes only. This server is not optimized for performance,
and is missing key features such as error pages, compression, and caching.
For production, I recommend using an application framework that supports server-side rendering,
such as Next.js. https://nextjs.org