Skip to content

Instantly share code, notes, and snippets.

View bcinarli's full-sized avatar
🚀

Bilal Çınarlı bcinarli

🚀
View GitHub Profile
@bcinarli
bcinarli / config.rb
Last active July 26, 2023 10:07
Bourbon based SASS config and debug options After import the config file, you can call bourbon as @import "bourbon"
# define bourbon path, use a common library for preventing duplicates
add_import_path "path/to/your/bourbon/lib"
### -->> project paths, delete/comment if you use scout, codekit etc.
environment = :production # removes single line comments, keeps css comments
output_style = :compact
css_dir = "styles" #relative to project root
sass_dir = "styles-sass" #relative to project root
images_dir = "images" #relative to project root
@bcinarli
bcinarli / google-cal-dark-theme.css
Created December 6, 2022 08:59
Dark Theme css override for Google Calendar, not-fully done, yet pretty usable
:root {
color-scheme: dark;
--primary: #bb86fc;
--primary-variant: #3700b3;
--on-primary: #000;
--secondary: #03dac5;
--secondary-variant: #d2e3fc;
--on-secondary: #000;
--on-secondary-variant: #018786;
--surface: #121212;
@bcinarli
bcinarli / clean-node-modules.js
Created May 25, 2019 12:52
Cleaning node modules, dist and build files in monorepo
const fs = require('fs');
const { rm } = require('./utils/file-actions');
const cwd = process.cwd();
const rm = (path) => {
if (fs.existsSync(path)){
exec(`rm -r ${ path }`, (err) => {
if (err) {
console.log(err);
@bcinarli
bcinarli / fontface.scss
Created October 19, 2013 12:50
Font-face mixin for SASS
@mixin fontface($name, $file, $weight: normal, $style: normal){
@font-face {
font-family: "#{$name}";
src: url('../fonts/#{$file}.eot');
src: url('../fonts/#{$file}.eot?#iefix') format('embedded-opentype'),
url('../fonts/#{$file}.woff') format('woff'),
url('../fonts/#{$file}.ttf') format('truetype'),
url('../fonts/#{$file}.svg?#webfont') format('svg');
font-weight: $weight;
font-style: $style;
@bcinarli
bcinarli / Brew
Created January 3, 2020 20:04
Brew
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Chrome
brew cask install google-chrome
# Install hyper
brew cask install hyper
hyper install hyperline
hyper install an-old-hype
@bcinarli
bcinarli / colors.scss
Last active January 18, 2019 09:55
Import SCSS variable to JS/JSX
// Sometimes you want to share some variables between your SCSS and JS/JSX code
// To do this, you can levarage the :export command in SCSS.
$alertInfo: #b8d3e8;
$alertWarning: #fdf9c3;
$alertSuccess: #cfc;
$alertError: #e63f3f;
// this exports the variable to be available in JS
:export {
@bcinarli
bcinarli / basicss.scss
Last active December 28, 2015 20:15 — forked from ademilter/basicss.css
/**
* 1. http://www.paulirish.com/2012/box-sizing-border-box-ftw/
* http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
* http://fatihhayrioglu.com/css3-box-sizing-ozelligi/
*
* 2. http://aestheticallyloyal.com/public/optimize-legibility/
*
* 3. http://maxvoltar.com/archive/-webkit-font-smoothing
*
* 4. http://maximilianhoffmann.com/posts/better-font-rendering-on-osx
@bcinarli
bcinarli / Sass-buttons.markdown
Created October 19, 2013 12:59
A Pen by Bilal Çınarlı.
@bcinarli
bcinarli / sampleCollection.js
Last active August 29, 2015 14:24
Backbone collection sort
var app = app || {};
(function(){
"use strict";
app.Collection = Backbone.Collection.extend({
model: app.Model,
// initial sort when collection fetched first time
comparator: "id"
});
@bcinarli
bcinarli / _remify.scss
Created June 7, 2014 18:02
Rem to PX and PX to Rem conversions according to defined $base-font-size
/* @author Bilal Cinarli */
/** -------------------------------------------
Text Related Functions
------------------------------------------- **/
/**
* Rem to PX
*/
@function rem-to-px($font-size) {
$u: unit($font-size);