Skip to content

Instantly share code, notes, and snippets.

@maxviewup
maxviewup / SassMeister-input.scss
Last active July 26, 2017 12:04
SASS/SCSS #at-root and #selector-unify examples
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Class component
.component{
color:red;
@at-root section#{&} {
color:blue;
@maxviewup
maxviewup / Foo.php
Created January 10, 2018 19:09
PHP Singleton Class
// simple singleton instance getter - one line
Class Foo {
private static $instance = null;
public static function get_instance() {
return self::$instance ?: self::$instance = new self;
}
// ...class code
}