Skip to content

Instantly share code, notes, and snippets.

View perjo927's full-sized avatar
πŸ§‘β€πŸ’»

Per Jonsson perjo927

πŸ§‘β€πŸ’»
  • DevCode
  • Stockholm, Sweden
View GitHub Profile
@perjo927
perjo927 / HoverSupported.css
Last active November 10, 2022 16:17
CSS: Support hover only on non-touch devices using media query
/*
* Compiled CSS:
*/
a {
color: green;
}
@media not all and (pointer: coarse) {
a:hover {
color: blue;
}
@perjo927
perjo927 / CssUtils.ts
Last active April 29, 2018 14:13
Media query hacks for weird browsers (React+Styled Components)
// cssUtils.ts
import { css } from "styled-components";
export const IEOnly: Function = style => {
return css`
@media all and (-ms-high-contrast:none) {
*::-ms-backdrop, & {
${style};
}
`;
@perjo927
perjo927 / imperialmarch.ino
Created April 8, 2018 17:24
Imperial march from Star Wars for Zumo Robot Buzzer
#include <Wire.h>
#include <Zumo32U4.h>
Zumo32U4Buzzer buzzer;
const char march[] PROGMEM =
"! O2 T100 MS"
"a8. r16 a8. r16 a8. r16 f8 r16 >c16"
"ML"
"a8. r16 f8 r16" "MS" ">c16 a. r8"

Next-generation JavaScript frameworks

Web application frameworks have been developing fast in the past few years, and as the technologies that they're built on top of get more advanced, each of these frameworks is able to provide newer features to help developers build more complex applications. This year, we've seen the release of a new class of application frameworks that takes advantage of JavaScript's ability to be both on the client and the server. What this allows these frameworks to do is provide both a new level of abstraction by sharing code between client and server, as well as embrace the benefits of both client-side rendering and server-side rendering.

For the end user, they get smooth, desktop-like responsiveness from client-side rendering, while still being able to maintain the SEO and accessbility benefits of server-side rendering. For developers, that means writing less boilerplate code, and being able to focus more on writing the application logic.

Today, there are three main framew