Skip to content

Instantly share code, notes, and snippets.

Panel

Panel is a set of guidelines that extend the RSCSS guide for Sass components to create a more flexible "box model" by using layers.


RSCSS recommends using a component structure like the one below. If you're not familiar with how RSCSS works, you should read through the RSCSS documentation before continuing on.

Better Flex

The problem

  • display: flex is just display: block that assigns different flow to the children.
  • display: inline-flex is just display: inline that assigns different flow to the children.

So why mess with block or inline at all!? Why not have a property that just assigns a different flow to the children??

The goal

input

Vue for Nuebs

Part 1: Setting up a new Vue project.

1. Install vue-cli

npm install -g vue-cli

Vue for Nuebs

Part 2: Importing Vue components.

1. Install the relevant preprocessors you want to use.

npm install --save-dev node-sass jade

2. Create a new Vue component file in your src directory called main.vue.

function btoa(v) {
var l=v.length,i=(~~(l/3)+1)*4,n,c='',r='',e=0,s,t,q,h='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
while(--i){
if(l-->0){
n=v[v.length-1-l].charCodeAt().toString(2)
c=c+('00000000'.substr(n.length)+n)
}
s=c.substr(e,6)
r=r+h[parseInt(s,2)]
e=e+6
#!/bin/sh
echo 'Show hidden files in finder'
defaults write com.apple.finder AppleShowAllFiles yes; killall Finder
echo 'Lock the size of the dock'
defaults write com.apple.dock size-immutable -bool yes; killall Dock
echo 'Delete all .DS_Store files'
sudo find / -name ".DS_Store" -depth -exec rm {} \;
Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.
const env = process.env
let result = ''
for (let key in env) {
result += '$' + key + ': \'' + env[key] + '\';\n'
}
process.stdout.write(result)
window.fetch('sunset.jpg')
.then(res => {
const reader = res.body.getReader()
let result = new Uint8Array()
const processImage = ({ done, value }) => {
if (done) {
console.log('done')