Skip to content

Instantly share code, notes, and snippets.

View kleinlennart's full-sized avatar
💭

Lennart Klein kleinlennart

💭
View GitHub Profile
@idleberg
idleberg / vscode-macos-context-menu.md
Last active April 10, 2025 03:21
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@matt-dray
matt-dray / badgr-shiny.R
Last active June 20, 2024 09:23
Make a shields.io README badge that links to a Shiny app, using the {badgr} package in R
# Make a README badge for your R Shiny repo
# Matt Dray, March 2021
# {badgr} blog post: https://www.rostrum.blog/2020/05/08/readme-badge/
# Shiny badge blog post: https://www.rostrum.blog/2021/03/23/shiny-badge/
# {badgr} is available from GitHub via {remotes}
install.packages("remotes") # if not already installed
remotes::install_github("matt-dray/badgr") # install {badgr}
@mcroach
mcroach / storing-image-assets-in-repo.md
Last active March 23, 2025 19:53
Using an 'assets' branch to store images in your repo

Storing image assets in your repo and referencing in markdown

Create an assets branch and make the initial commit

git checkout --orphan assets
git reset --hard
cp /path/to/cat.png .
git add .
git commit -m 'Added cat picture'
git push -u origin assets
@ciceronianus
ciceronianus / Roam-colored_fonts.css
Last active April 28, 2023 08:24
(deprecated) Roam - colored bold, italics and highlight by @CatoMinor3
/*
Author:: @CatoMinor3
Version:: 3.0
Date:: Sept.rm-italicsber 22nd, 2020
Changes log:
- 3.0 - code adapted for the new classes in Roam
- 2.1 - code adaptated for future support of colour shades (different opacity),
download the additonal CSS here: https://gist.github.com/ciceronianus/5d7b224658b7a9832a6249a13091aa9d
Support:
#===============================================================================
# 2019-07-19-- ikashnitsky.github.io
# Reproduce Figure 2 from http://doi.org/10.1007/s10708-018-9953-5
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(tidyverse)
library(hrbrthemes); import_roboto_condensed()
# the data as tribble
Goal CSS 3 XPath
All Elements * //*
All P Elements p //p
All Child Elements p>* //p/*
Element By ID #foo //*[@id=’foo’]
Element By Class .foo //*[contains(@class,’foo’)]
Element With Attribute *[title] //*[@title]
First Child of All P p>*:first-child //p/*[0]
All P with an A child Not possible //p[a]
Next Element p + * //p/following-sibling::*[0]
@kleinlennart
kleinlennart / c.md
Last active October 27, 2019 10:25
Terminal Commands List
  • ls -a
  • cd ~
  • open -a TextEdit.app .bash_profile
  • source ~/.bash_profile
  • open .
  • rm -r
  • export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

100 Days Of ML Code - Example Log

Use this as a base template. Create your own repository on GitHub and start logging your work daily!

Day 0: February 29, 2016 (Example 1)

(delete me or comment me out)

Today's Progress: Fixed CSS, worked on canvas functionality for the app.

Thoughts: I really struggled with CSS, but, overall, I feel like I am slowly getting better at it. Canvas is still new for me, but I managed to figure out some basic functionality.

@kleinlennart
kleinlennart / stateful.dart
Last active June 14, 2018 16:56
Template for StatefulWidget class constructor in Flutter
class MyWidget extends StatefulWidget {
@override
_MyWidgetState createState() => new _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
@override
void initState() {
// TODO: implement initState
@kleinlennart
kleinlennart / acronyms.md
Last active June 14, 2018 16:22
Programming Abbreviations
Akcronym Meaning
API Application Programming Interface
SDK Software Development Kit
IDE Integrated Development Environment
SQL Structured Query Language (SEQUEL - Structured English Query Language)
CSS Cascading Style Sheets
HTML Hypertext Markup Language
CMS Content Management System (Webpage)
DOM Document Object Model