Skip to content

Instantly share code, notes, and snippets.

@karlhorky
karlhorky / css-is-complex.md
Last active December 25, 2023 19:14
CSS is Complex. We can do better.

CSS is Complex. We can do better.

Posted on https://twitter.com/karlhorky/status/1082622697325166592

Ok, thread time.

CSS is unnecessarily complex. And we can do better.

There have been side conversations here and there, but I want to consolidate the information and opinions here. This will be a running thread, and I'll add to it as new things crop up.

@sisomm
sisomm / lever_pulled_mqtt.js
Last active January 4, 2016 09:39
How to send changes to a lever in Minecraft to a MQTT broker - and listen for changes in an Arduino
var mqtt = require('sc-mqtt');
var client = mqtt.client(); // local host is default. Otherwise use host, user/pwd
client.connect();
//Subscribe to changes in the state of the Arduino
client.subscribe('/arduino/1/status');
var player; // To remember who pulled the switch
// Here we tell Minecraft to give us control after certain events
events.on('player.PlayerInteractEvent', function (listener, event) {
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"