Skip to content

Instantly share code, notes, and snippets.

View lewismcarey's full-sized avatar

Lewis Carey lewismcarey

  • ThirtyThree
  • London, UK
View GitHub Profile
@lewismcarey
lewismcarey / input.scss
Created March 5, 2021 11:10
Generated by SassMeister.com.
@use "sass:list";
@charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly
// See https://github.com/sass-mq/sass-mq/pull/10
/// Base font size on the `<body>` element
/// @type Number (unit)
$mq-base-font-size: 16px !default;
/// Responsive mode
@lewismcarey
lewismcarey / wget.sh
Created June 12, 2019 09:09
WGET a website
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --no-parent -U Mozilla --no-check-certificate --limit-rate=200k url.com
@lewismcarey
lewismcarey / page_theme.php
Last active December 20, 2021 16:18
Concrete 5.7 Annotated Page Theme Example
<?php
namespace Application\Theme\Customtheme;
use Concrete\Core\Area\Layout\Preset\Provider\ThemeProviderInterface;
class PageTheme extends \Concrete\Core\Page\Theme\Theme implements ThemeProviderInterface
{
/**
* Theme name
*
@lewismcarey
lewismcarey / _font.scss
Last active July 1, 2018 16:15
sass function set contrasting font color based on background
// contrasting font color
@function set-font-color($color, $dark: #000, $light: #FFF) {
// return $dark or $light color depending on lightness of $color
@return if(lightness($color) > 50, $dark, $light);
}
$color: #0000FF;
.default {
@lewismcarey
lewismcarey / SassMeister-input.scss
Last active August 29, 2015 14:27
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// list for class names
$alpha: a b c d e f g h i j k l m n o p q r s t u v w x y z;
// Color Map
$colors: (
blue: #0000FF,
red: (
@lewismcarey
lewismcarey / SassMeister-input.scss
Last active May 4, 2023 12:10
Get Color from SASS Color Map
// ----
// libsass (v3.2.5)
// ----
// Color Map
$colors: (
blue: #0000FF,
red: (
base: #FF0000,
light: #EEEEFF,
@lewismcarey
lewismcarey / SassMeister-input.scss
Created July 1, 2015 14:56
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// Colors
// Base Colors
$c-black: #000000;
$c-white: #ffffff;
@lewismcarey
lewismcarey / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/bin/bash
#
# Some SASS helpers
#
# INSTALL:
#
# * save the sassbash file somewhere
# * chmod +x it to make it executable
# * add path to script in your .bashrc
# * . /path/to/sassbash
@lewismcarey
lewismcarey / SassMeister-input-HTML.html
Last active August 29, 2015 14:14
Generated by SassMeister.com.
<a href="#" class="btn">Don't Click Me</a>