Skip to content

Instantly share code, notes, and snippets.

View patriziosotgiu's full-sized avatar

Patrizio Sotgiu patriziosotgiu

View GitHub Profile
@mirisuzanne
mirisuzanne / cq.css
Last active October 6, 2021 10:41
Thoughts on Container Queries
/*
This is not meant to be a final CSSWG proposal,
but reflects my immediate thoughts after reading
[David Baron's](https://github.com/dbaron/container-queries-implementability) promising draft.
This gist was created to demonstrate my idea for removing selectors from his query syntax.
More of my thoughts & notes are online at css.oddbird.net/rwd/
*/
main,
@Potherca
Potherca / README.md
Last active March 4, 2024 23:40
The search for a Regex to match BEM CSS class-names

The search for a Regex to match BEM CSS class-names

TL;DR

Use this regular expression to match BEM class-names:

^\.[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$
@dennis-best
dennis-best / Jira ticket to branch name.applescript
Last active October 9, 2017 19:20
Create a branch name from a Jira ticket
-- This script will copy a specially formatted version of the current Chrome tab to your clipboard. For example, if you are viewing Jira ticket in Chrome, "sig-435-add-icons-to-abm-filter-panel" or "[SIG-435] Add icons to ABM filter panel" can be copied to the clipboard.
-- How to use: Save to ~/Library/Scripts folder and enable the AppleScript menu (launch Applications/Script Editor and go to settings) or download FastScripts (for more features including add hot keys).
tell application "Google Chrome"
if not (exists window 1) then return
set theTitle to the title of active tab of window 1
tell application "System Events"
@ryanve
ryanve / grids.scss
Last active January 24, 2017 20:42
bourbon neat grid utility classes
.is-clearfix {
@include clearfix;
}
.is-clear {
clear: both;
}
.is-container {
@include outer-container;
@ryanve
ryanve / is-sibling-grid.scss
Last active March 6, 2017 02:19
Bourbon Neat mixin for Lea Verou's styling columns by sibling count technique
.is-sibling-grid {
margin-left: auto;
margin-right: auto;
padding-left: 0;
padding-right: 0;
}
.is-sibling-grid > :only-child {
display: block;
width: 100%;
@ourmaninamsterdam
ourmaninamsterdam / LICENSE
Last active April 24, 2024 18:56
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
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:
@ryanve
ryanve / .gitconfig
Last active May 11, 2022 09:17
git aliases
[alias]
co = checkout
ci = commit
ca = commit --amend
cia = commit -a
can = commit --amend --no-edit
com = checkout master
st = status
s = status --short
b = branch
@betweenbrain
betweenbrain / gist:2284129
Created April 2, 2012 14:56
Git command to export only changed files between two commits
git archive --output=file.zip HEAD $(git diff --name-only SHA1 SHA2)