Skip to content

Instantly share code, notes, and snippets.

View joennlae's full-sized avatar
🏗️

Jannis Schönleber joennlae

🏗️
View GitHub Profile
@Sieboldianus
Sieboldianus / README.md
Last active June 15, 2024 19:19
An opinionated nextcloud ignore list for developers (sync-exclude.lst)

An opinionated nextcloud ignore list for developers (sync-exclude.lst)

The latest nextcloud server versions will have ransomware detection automatically enabled, meaning that syncing common developer file types (e.g. .lock) will return errors.

Fatal webdav OCA\DAV\Connector\Sabre\Exception\Forbidden: Ransomware file detected. Prevented upload of ..py/bokeh/secrets.tar.enc because it matches extension pattern ".enc"

If you are syncing complex, nested work directories as a developer, the following

@lguenth
lguenth / Zotero Highlights Template Without Templater.md
Last active March 2, 2024 09:02
Zotero Integration Templates
created modified
{"importDate|format(\"YYYY-MM-DD\")"=>nil}
{"importDate|format(\"YYYY-MM-DD\")"=>nil}

{{shortTitle|replace(":", " –")}}

Quelle: [[@{{citekey}}]]

{% if annotations.length > 0 -%} Hinzugefügt am [[{{importDate | format("YYYY-MM")}}#{{importDate | format("YYYY-MM-DD")}}]]

@chponte
chponte / gnu-toolchain.md
Last active June 23, 2024 22:39
Building a complete GNU toolchain, comprised of binutils + gcc + glibc
@MoritzBuetzer
MoritzBuetzer / vzug.yaml
Created December 21, 2020 08:17
REST Integration for V-Zug Home Appliances in Home Assistant
- platform: rest
resource: http://[DEVICE_IP]/ai?command=getDeviceStatus
name: 'V-Zug CookTopInduktion V6000'
authentication: digest
username: !secret vzug.username
password: !secret vzug.password
json_attributes:
- DeviceName
- Serial
- Inactive
@chrisbrocklesby
chrisbrocklesby / JS Cheatsheet.md
Created January 1, 2020 06:12
Cheatsheet Javascript
@bgbg
bgbg / asciihist.py
Last active August 17, 2023 09:34
ASCII histograms
from __future__ import print_function
import numpy as np
def asciihist(it, bins=10, minmax=None, str_tag='',
scale_output=30, generate_only=False, print_function=print):
"""Create an ASCII histogram from an interable of numbers.
Author: Boris Gorelik boris@gorelik.net. based on http://econpy.googlecode.com/svn/trunk/pytrix/pytrix.py
License: MIT
"""
ret = []
import { AfterViewInit, Directive, ElementRef, EventEmitter, forwardRef, Inject, Injectable, InjectionToken, Injector, Input, NgZone, OnInit, Output } from '@angular/core';
import { AbstractControl, ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, NgControl, Validators } from '@angular/forms';
import { Http } from '@angular/http';
declare const grecaptcha : any;
declare global {
interface Window {
grecaptcha : any;
reCaptchaLoad : () => void
@mustafaturan
mustafaturan / network-tweak.md
Last active June 16, 2024 21:58
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
@rudolfovich
rudolfovich / csvfile.h
Last active June 13, 2024 08:39
CSV file generator
#pragma once
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
class csvfile;
inline static csvfile& endrow(csvfile& file);
inline static csvfile& flush(csvfile& file);
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule