Skip to content

Instantly share code, notes, and snippets.

View cossssmin's full-sized avatar
💭

Cosmin Popovici cossssmin

💭
View GitHub Profile
@cossssmin
cossssmin / basic.css
Created December 1, 2023 03:09
Simple CSS
body {
background-color: gray;
}
@cossssmin
cossssmin / hybrid-email-2-col.html
Created March 3, 2021 16:45
Hybrid 2-column responsive/stackable HTML email layout, with media query enhancement
<!DOCTYPE html>
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8">
<meta name="x-apple-disable-message-reformatting">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
<!--[if mso]>
<xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml>
@cossssmin
cossssmin / 2019-https-localhost.md
Created February 11, 2021 18:48 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@cossssmin
cossssmin / maizzle-nested-components.html
Created August 18, 2020 16:48
Nesting components in Maizzle
<!-- src/layouts/master.html -->
<!DOCTYPE {{{ page.doctype || 'html' }}}>
<html lang="{{ page.language || 'en' }}">
<head>
<meta charset="{{ page.charset || 'utf-8' }}">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="x-apple-disable-message-reformatting">
<!--[if mso]>
<xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml>
@cossssmin
cossssmin / wt.reg
Created February 21, 2020 11:24
Add Windows Terminal to context menu
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Directory\shell\wt]
@="Windows Terminal Here"
"Icon"="C:\\Users\\{YOUR_USER_NAME}\\AppData\\Local\\terminal\\terminal.ico"
[HKEY_CURRENT_USER\Directory\shell\wt\command]
@="C:\\Users\\{YOUR_USER_NAME}\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe new-tab -d \"%V\" -p \"Pengwin\""
[HKEY_CURRENT_USER\Directory\Background\shell\wt]
<template>
<ins class="adsbygoogle"
:data-ad-client="adClient"
:data-ad-slot="adSlot"
:data-ad-format="adFormat"
:style="adStyle"></ins>
</template>
<script>
export default {
@cossssmin
cossssmin / index.html
Created October 7, 2018 11:29
Vue.js render textarea HTML in iframe
<div id="app">
<div class="flex flex-wrap h-screen">
<editor target="preview" class="w-full lg:w-2/5 p-4 font-mono bg-grey-lightest outline-none resize-none"></editor>
<iframe id="preview" class="w-full lg:w-3/5 bg-graph-paper"></iframe>
</div>
</div>
</body>
@cossssmin
cossssmin / gradients.js
Last active June 4, 2021 20:25
Tailwind CSS background-image gradients plugin
const _ = require('lodash');
module.exports = ({e, addUtilities, config}) => {
const gradients = config('gradients', [])
const variants = config('modules.gradients')
const gradientUtilities = _.map(gradients, (colors, name) => {
if (!_.isArray(colors)) {
colors = ['transparent', colors];
}
@cossssmin
cossssmin / tailwind-rtl.js
Created October 4, 2018 15:49 — forked from patrikengborg/tailwind-rtl.js
Function for Tailwind to add a custom variant plugin for RTL sites.
function ({ addVariant }) {
addVariant('rtl', ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `[dir="rtl"] .rtl${separator}${className}`
})
})
}
@cossssmin
cossssmin / bg-graph-paper.css
Created September 23, 2018 19:18
Graph Paper CSS-only background
.bg-graph-paper {
background-color: #fff;
background-image: linear-gradient(rgba(244,244,250,.8) 1px,transparent 0),
linear-gradient(#f4f4fa 1px,transparent 0),
linear-gradient(90deg,rgba(244,244,250,.8) 1px,transparent 0),
linear-gradient(90deg,#f4f4fa 1px,transparent 0),
linear-gradient(transparent 3px,#fff 0,#fff 94px,transparent 0),
linear-gradient(90deg,#f4f4fa 3px,transparent 0,transparent 94px,#f4f4fa 0);
background-size: 24px 24px,96px 96px,24px 24px,96px 96px,96px 96px,96px 96px;
}