Skip to content

Instantly share code, notes, and snippets.

View juliankasimir's full-sized avatar
🏠
Working from home

Julian Kasimir juliankasimir

🏠
Working from home
View GitHub Profile
@juliankasimir
juliankasimir / gist:07523e0ec7b425e53075c27a48833590
Last active June 20, 2024 04:30
WARNING: Reset Git History !
git pull
git checkout --orphan main-clean
git add .
git commit --allow-empty -n -m "refactor: remove history"
git branch -D main
git branch -m main
git push -f origin main
@juliankasimir
juliankasimir / pre-commit
Created October 4, 2023 07:39
husky git pre commit hook
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# Get current branch name
branch="$(git rev-parse --abbrev-ref HEAD)"
# Prevent pushing to main or develop
if [ "$branch" = "main" ] || [ "$branch" = "develop" ]; then
echo "❌ You can't commit directly to $branch branch"
exit 1
@juliankasimir
juliankasimir / todo-comments.yml
Created July 3, 2023 06:39
.github/workflows/todo-comments.yml
name: Todo Comments
on: [ pull_request ]
jobs:
todo-comments:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
@juliankasimir
juliankasimir / pr-title.yml
Last active July 5, 2023 12:36
.github/workflows/pr-title.yml
name: Validate pull request title
on:
pull_request:
types: [ opened, edited ]
jobs:
validate-pr-title:
name: Validate pull request title
runs-on: ubuntu-latest
pre-commit:
# Get the name of the current branch
currentBranch=$(git rev-parse --abbrev-ref HEAD)
# Check if the current branch is "main" or "master" and reject commit
if [ "$currentBranch" = "main" ] || [ "$currentBranch" = "master" ]; then
echo "ERROR: Commit rejected by Husky pre-commit hook!"
echo "You are about to commit to the \"$currentBranch\" branch!"
echo "Please create a new branch and commit there."
@juliankasimir
juliankasimir / gist:13750016d26330008adca7353cbb9e90
Last active April 27, 2023 12:40
Borlabs Cookie Datenschutz Code
<h3>Ihre Cookie ID</h3>
[borlabs-cookie type="uid"/]
<h3>Cookie Einstellung</h3>
[borlabs-cookie type="btn-cookie-preference" title="Einstellung öffnen" element="link"/]
<h3>Cookie Auflistung</h3>
[borlabs-cookie type="cookie-list"/]
@juliankasimir
juliankasimir / tailwind.scss
Created March 1, 2023 09:25
Adopt or recreate classes Tailwind
// Manual: https://stackoverflow.com/a/72364191/14331711
// Syntax: https://tailwindcss.com/docs/customizing-colors
$bg-blue-900: #004070;
$bg-blue-700: #537AA2;
$bg-blue-300: #C1CCDD;
$bg-blue-50: #EAEDF3;
$white: #FFF;
$black: #000;
// Define Tailwind Colors
{
"files": [
"assets/ts/*.ts"
],
"compilerOptions": {
"allowJs": true,
"module": "commonjs",
"sourceMap": true,
"noImplicitAny": true,
"target": "es6",
const defaultTheme = require('tailwindcss/defaultTheme')
module.exports = {
content: [
'./**/*.php',
'../Resources/**/*.{html,js}',
],
important: true,
safelist: [
'bg-white',
{
"data": {
"slug": "loremipsum",
"siteName": "loremipsum",
"url": "https://loremipsum.de"
},
"settings": {
"isEnv": "production",
"isServer": false
},