Skip to content

Instantly share code, notes, and snippets.

View flosommerfeld's full-sized avatar
:atom:
Coding

Florian Sommerfeld flosommerfeld

:atom:
Coding
View GitHub Profile
@sprklinginfo
sprklinginfo / readme.md
Last active March 28, 2024 01:16
Online PDF Viewer for BookStack App

Setup

Download PDFJS prebuilt version from https://mozilla.github.io/pdf.js/getting_started/#download

Unzip the file to 'pdfjs' folder and move it to the BookStack app 'public' folder. Ensure both 'build' and 'web' folders and its files are there.
pdfjs-folder

Copy and paste the following code to Custom HTML Head Content field on Settings page:

@AlexandraKapp
AlexandraKapp / osrm_docker_windows.md
Last active March 29, 2024 19:38
How to set up your own OSRM backend with Docker on Windows

How to set up your own OSRM backend with Docker on Windows

The OSRM docker quick start provides a great explanation on how to set up the container: https://hub.docker.com/r/osrm/osrm-backend/

Yet - for Docker on Windows minor changes were necessary for me (otherwise I'd get "File not found" or "Permission" errors).

This is how it worked for me:

1. Pull the image

@sgherbst
sgherbst / install.md
Last active October 14, 2023 08:47
Installing Vivado 2018.3 on Ubuntu 18.04 for the PYNQ-Z1 board
@xero
xero / semantic-commit-messages.md
Last active August 21, 2023 12:58
bb commit style guide :: how we liven up the commit history

semantic commit messages

see how a minor change to your commit message style can make you a better programmer self generate {docs,changelog}, add context to the changeset, enable filtering (e.g. ignore styling or documentation changes), and liven up the commit history!

format: <type>(<scope>): <ticket> subject :emoji:

  • <scope>
    • optional
    • some changes are global or difficult to assign to a single component
  • ``
@carljdp
carljdp / D1 Mini ESP8266.md
Last active January 7, 2024 13:46
Getting started with the D1 mini (ESP8266)

D1 Mini (ESP8266)

Wesmos D1 Mini

1. Getting Started

1.1. Install the IDE:

In any web browser:

  • From the Arduino website, download & install the latest Arduino IDE (v1.8 or later). Available for Windows, Mac, Linux & ARM.

1.2. Add the ESP8266 module libraries:

@learncodeacademy
learncodeacademy / pickRandomComment.js
Created May 24, 2017 19:13
YouTube Random Comment Selector
const axios = require("axios");
const key = "AIzaSyB9e-dHIvdxxrbmorjYHWipwBKq7LJBhNk"
function getComments(pageToken, allItems = {}) {
const params = {
key,
videoId: "a4haLJdDRmc",
part: "snippet",
maxResults: 100,
pageToken,

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@flosommerfeld
flosommerfeld / genTest.py
Last active November 20, 2016 17:18
just some simple codegenerators for a project
import random
#Codegenerator 1:
value = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"]
digit1 = random.randint(0,35)
digit2 = random.randint(0,35)
digit3 = random.randint(0,35)
digit4 = random.randint(0,35)
@udacityandroid
udacityandroid / MainActivity.java
Created June 27, 2015 23:17
Android for Beginners : Menu Solution Code
package com.example.android.menu;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@udacityandroid
udacityandroid / Calculate price method
Created June 9, 2015 23:49
Add to MainActivity.java
/**
* Calculates the price of the order.
*
* @param quantity is the number of cups of coffee ordered
*/
private void calculatePrice(int quantity) {
int price = quantity * 5;
}