chown -R <user>:<group> <pathToFileOrDirectory>
(-R to recursively change permission to a folder)
Nice blog explaining user management on Linux: https://www.linode.com/docs/tools-reference/linux-users-and-groups
@function trim-unit($value) { | |
@return $value / ($value * 0 + 1); | |
} | |
@function rem-calc($value) { // $value is in px, returned value is in rem | |
@return $value / trim-unit() * 1rem; | |
} |
.string { color: #ff5722; } | |
.number { color: #009688; } | |
.boolean { color: #2196F3; } | |
.null { color: #3f51b5; } | |
.key { color: #545E6C; } |
#!/usr/bin/env bash | |
# Assuming you have a master and dev branch, and that you make new | |
# release branches named as the version they correspond to, e.g. 1.0.3 | |
# Usage: ./release.sh -v 1.0.3 | |
# Use the -b or --bump parameter to only bump | |
# Default values | |
bump=false |
/** | |
* Returns a value always between 0 and size - 1. | |
* @param a current index | |
* @param b size | |
*/ | |
export function modulo(a, b) { return (+a % (b = +b) + b) % b; }; |
chown -R <user>:<group> <pathToFileOrDirectory>
(-R to recursively change permission to a folder)
Nice blog explaining user management on Linux: https://www.linode.com/docs/tools-reference/linux-users-and-groups
let img = new Image(); | |
img.onload = () => { | |
console.log('youpiiii img preloaded !') | |
}; | |
img.src = 'some_url'; |
import { modulo } from "./utils"; | |
export class Pager { | |
next:number = 0; | |
previous:number = 0; | |
constructor(public current:number = 0, public length:number = 0, noModulo:boolean = false) { | |
this.setNeighbours(noModulo); | |
} |
img[alt] { | |
position: relative; | |
&:after { | |
display: block; | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
/* Add bg color and the text of the alt attribute in place of the broken image */ |
To completely uninstall node + npm is to do the following:
/usr/local/lib
and delete any node
and `node_modules/usr/local/include
and delete any node
and node_modules
directorybrew install node,
then run brew uninstall node
in your terminallocal
or lib
or include
folders, and delete any node
or node_modules
from there/usr/local/bin
and delete any node executablesudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules