Skip to content

Instantly share code, notes, and snippets.

View rv-17's full-sized avatar

Roman Volkov rv-17

  • Germany
View GitHub Profile
@arun07as
arun07as / RotateLogFilesByYearAndMonth.md
Last active June 7, 2025 14:11
Laravel split logs files by year and month folders

Laravel's daily driver for generating logs is great, but sometimes you wish you could break it up even more. These code snippets will help you break up your laravel logs by year and month folders

For example, the channel error from these snippets will gennerate files such as

/storage/logs/errors/2021/02/laravel-2021-02-28.log
/storage/logs/errors/2021/03/laravel-2021-03-01.log
/storage/logs/errors/2021/03/laravel-2021-03-02.log
@domenkozar
domenkozar / kiosk-chromium.nix
Last active February 28, 2025 15:47
Boot NixOS into chromium kiosk (tested on NixOS 14.04)
services.xserver = {
enable = true;
monitorSection = ''
Option "NODPMS"
'';
serverLayoutSection = ''
Option "BlankTime" "0"
Option "DPMS" "false"
'';
displayManager.auto.user = "guest";
@jbfriedrich
jbfriedrich / nsmb.conf
Last active November 3, 2025 18:57
macOS 11.2 NSMB configuration
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29
#------------------------------------------------------------------------------
# SMB configuration for macOS 11.3 <-> Synology
#------------------------------------------------------------------------------
# Additional information:
# -----------------------
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
# Because build platform is different than target platform
set(CMAKE_CROSSCOMPILING TRUE)
set(TOOLCHAIN_USED "NI LinuxRT SDK 2017")
# Generator is force to Unix Makefiles to generate a makefiles
# Otherwise Visual Studio generator is there by default because
@mbinna
mbinna / effective_modern_cmake.md
Last active November 4, 2025 12:56
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

@NickCraver
NickCraver / .editorconfig
Created September 26, 2017 21:31
Stack Overflow's .editorconfig
# editorconfig.org
root = true
# Don't use tabs for indentation.
[*]
indent_style = space
[*.less]
charset = utf-8
end_of_line = lf
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active October 27, 2025 18:09
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@battermann
battermann / free.fsx
Last active November 9, 2024 13:13
Free Monad like pattern in F#
#load @"paket-files/fsprojects/Chessie/src/Chessie/ErrorHandling.fs"
type Continuation<'output, 'next> = 'output -> 'next
module TerminalDsl =
open Chessie.ErrorHandling
type Terminal<'next> =
| WriteLine of string * Continuation<unit, 'next>
| ReadLine of unit * Continuation<string, 'next>
@datakurre
datakurre / configuration.nix
Last active October 14, 2024 07:25
Bootable NixOS USB stick for kiosk or demo usage
{ config, lib, pkgs, ... }:
with lib;
{
imports = [
# ISO image
<nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix>
# Hardware support similar to installer Live CD
<nixpkgs/nixos/modules/profiles/all-hardware.nix>
@lukas-h
lukas-h / license-badges.md
Last active November 5, 2025 16:55
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)