Skip to content

Instantly share code, notes, and snippets.

Avatar
🤸‍♂️
Jumping around

Nikola Ristić rista404

🤸‍♂️
Jumping around
View GitHub Profile
@Hunsin
Hunsin / router.go
Last active Sep 9, 2020
The package wraps julienschmidt's httprouter, making it support functions such as middlewares, sub/group routing with same prefix. Written in Go (Golang).
View router.go
package router
import (
"context"
"net/http"
gpath "path"
"github.com/julienschmidt/httprouter"
)
View deferComponentRender.js
import hoistStatics from 'hoist-non-react-statics';
import React from 'react';
/**
* Allows two animation frames to complete to allow other components to update
* and re-render before mounting and rendering an expensive `WrappedComponent`.
*/
export default function deferComponentRender(WrappedComponent) {
class DeferredRenderWrapper extends React.Component {
constructor(props, context) {
@eduncan911
eduncan911 / go-build-all
Last active Oct 15, 2020
Go Cross-Compile Script
View go-build-all
#!/bin/bash
#
# GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script:
# http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go
#
# To use:
#
# $ cd ~/path-to/my-awesome-project
# $ go-build-all
#
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active Aug 3, 2020
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.
View pseudo_elements.md

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@addyosmani
addyosmani / README.md
Last active Oct 18, 2020 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger
View README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@benatkin
benatkin / Global.sublime-settings
Created Jul 20, 2011
excluding node_modules from Sublime Text 2
View Global.sublime-settings
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
You can’t perform that action at this time.