Skip to content

Instantly share code, notes, and snippets.

View klick's full-sized avatar

Marcus Scheller klick

View GitHub Profile
---
description:
globs:
alwaysApply: true
---
At the end of each task, you need to write all changes to ARCHITECTURE.md.
And by write all changes, I mean modify the architecture of the entire app. If you've changed a function - modify its params/output or whatever you changed.
If you've added a new file - add it to the ARCHITECTURE.md.
@klick
klick / .htaccess
Created August 9, 2024 12:21
Example htaccess
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript
@klick
klick / hosts
Created March 22, 2018 09:08
Hosts File to Block Facebook from my Machine
127.0.0.1 api.ak.facebook.com
127.0.0.1 api.connect.facebook.com
127.0.0.1 api.facebook.com
127.0.0.1 app.facebook.com
127.0.0.1 apps.facebook.com
127.0.0.1 ar-ar.facebook.com
127.0.0.1 badge.facebook.com
127.0.0.1 blog.facebook.com
127.0.0.1 connect.facebook.com
127.0.0.1 connect.facebook.net
@klick
klick / SCSS mixin background high res
Last active August 29, 2015 14:24
Mixin background images + high res
// Background images + high res
@mixin background-image($image, $image2x) {
background: url($image) no-repeat;
background-size: cover;
background-position: center center;
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
// Brightness math based on:
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx
$red-magic-number: 241;
$green-magic-number: 691;
$blue-magic-number: 68;
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number;
@function brightness($color) {
// Extract color components
@klick
klick / CSS hyphenation
Last active August 29, 2015 14:06
Hyphenation
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
@klick
klick / CSS selection
Created September 21, 2014 16:53
Selection
::selection {
background: #ffb7b7; /* WebKit/Blink Browsers */
}
::-moz-selection {
background: #ffb7b7; /* Gecko Browsers */
}
@klick
klick / BASH replace
Created August 24, 2014 11:46
replace special characters
's/\ /-/g;s/\ä/\ae/g;s/\Ä/\ae/g;s/\ö/\oe/g;s/\Ö/\oe/g;s/\ü/\ue/g;s/\Ü/\ue/g;s/\ß/\ss/g;s/\’//g;s/\,/-/g;s/\“//g;s/\”//g;s/\„//g;s/\“//g;s/\?//g;s/\!//g;'
@klick
klick / craft color rgb
Created May 13, 2014 16:04
craft convert hex color to rgb
{% set r = entry.color | slice(1, 2) | hexdec %}
{% set g = entry.color | slice(3, 2) | hexdec %}
{% set b = entry.color | slice(5, 2) | hexdec %}
{% set colorRGB = r + g + b %}
@klick
klick / gist:9365633
Last active August 29, 2015 13:57 — forked from klickgists/gist:4340783
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" user-scalable="no">
<link rel="stylesheet" href="css/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>