Skip to content

Instantly share code, notes, and snippets.

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@biroa
biroa / php-event-listener-example.php
Created July 15, 2020 15:54 — forked from im4aLL/php-event-listener-example.php
PHP event listener simple example
<?php
class Event {
private static $events = [];
public static function listen($name, $callback) {
self::$events[$name][] = $callback;
}
public static function trigger($name, $argument = null) {
foreach (self::$events[$name] as $event => $callback) {
local return_code="%(?..%{$FG[209]%}%? %{$reset_color%})"
PROMPT='%{$FG[110]%}{ %c } \
%{$FG[150]%}$( git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "" )%{$reset_color%} \
%{$FG[209]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$FG[209]%}\ %{$reset_color%}'
RPS1='%{$FG[223]%}%n@%m: %{$reset_color%}\
%{$FG[110]%}%~%{$reset_color%} ${return_code}'