Skip to content

Instantly share code, notes, and snippets.

@WebDevSimplified
WebDevSimplified / bootstrap-breakpoint.css
Last active May 4, 2024 21:33
This stylesheet adds text describing the current Bootstrap Breakpoint in the top right corner of the screen.
body {
margin-top: 40px; /* This margin just makes the text easier to read. You can remove it if you want since it can mess with your other styles. */
}
body::before {
content: "XS";
color: red;
font-size: 2rem;
font-weight: bold;
position: fixed;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 4, 2024 21:33
A badass list of frontend development resources I collected over time.
@wojteklu
wojteklu / clean_code.md
Last active May 4, 2024 21:33
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

// Zero-Clause BSD (more permissive than MIT, doesn't require copyright notice)
//
// Permission to use, copy, modify, and/or distribute this software for any purpose
// with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
// OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
@b01
b01 / download-vs-code-server.sh
Last active May 4, 2024 21:25
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
# Copyright 2023 Khalifah K. Shabazz
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the “Software”),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
@kuc-arc-f
kuc-arc-f / app.js
Created January 18, 2022 02:31
Serverless Framework express, prisma (mysql) sample
const serverless = require('serverless-http');
const express = require('express');
const indexRouter = require('./routes/index');
const usersRouter = require('./routes/users');
const app = express();
app.use('/', indexRouter);
app.use('/users',usersRouter);
module.exports = app;
@relvinhas
relvinhas / DANOS_VM_SETUP
Last active May 4, 2024 21:23
DANOS VM Setup - Passthrough and CPU pinning
virsh destroy edge-router
virsh undefine --nvram edge-router
virsh vol-delete edge-router --pool fast-storage
virt-install \
--name edge-router \
--cpu host-passthrough \
--vcpus=4,sockets=1,cores=4,threads=1 \
--ram 2048 \
--os-variant debian10 \
@qoomon
qoomon / conventional_commit_messages.md
Last active May 4, 2024 21:21
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@madduci
madduci / ftth_openwrt.md
Last active May 4, 2024 21:21
Deutsche Telekom FTTH Access with OpenWRT

Configuring Deutsche Telekom FTTH Access with OpenWRT

After looking for alternatves to the suggested Router from Telekom (AVM FritzBox and HUawei Speedport), I've discovered the possibility of configuring my existing OpenWRT Router to act as gateway to the Telekom FTTH (Fiber To The Home) Magenta Zuhause package.

TL;DR

The WAN interface must be configured as follows (see your Telekom letter):

  • Protocol: PPPoE
  • PAP/CHAP username:
@m5lil
m5lil / reset.sh
Last active May 4, 2024 21:19
[reset jetbrains application trial] reset jetbrains ide evals v1.0.4 #others
#!/bin/bash
# reset jetbrains ide evals v1.0.4
OS_NAME=$(uname -s)
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
if [ "$OS_NAME" == "Darwin" ]; then
echo 'macOS:'
for PRD in $JB_PRODUCTS; do