Copy the files above to /usr/local/bin
and execute the command chown +x ss sp
For use it just:
starting a service ~> ss mongodb
stoping a service ~> sp service
type IfStatNode struct { | |
Condition Node | |
ThenBranch Node | |
ElseBranch Node | |
} | |
func (n *IfStatNode) Interpret(i *Interpreter) (Node, error) { | |
conditionNode, err := n.Condition.Interpret(i) | |
if err != nil { | |
return nil, err |
interface DHeap { | |
heap: number[]; | |
breadth: number; | |
} | |
export function buildDHeap(breadth: number): DHeap { | |
return { | |
heap: [], | |
breadth, | |
}; |
function getToken (user) { | |
const secretKey = process.env.JWT || ‘stubJWT’; | |
return jwt.sign({ id: user._id, roles: user.roles }, secretKey, {expiresIn: ‘18h’}); | |
} |
console.log('lolololo'); |
.ngmp18 { | |
background-color: #fff; | |
overflow: hidden; | |
width: 100%; | |
height: 100%; | |
position: relative; | |
} | |
.ngmp18__hw3 { | |
color: #333; |
### Articles | |
type Article { | |
author: Profile! | |
body: String! | |
comments(first: Int, after: String): CommentsConnection | |
createdAt: String! | |
description: String! | |
favorited: Boolean! | |
favoritesCount: Int! | |
slug: String! |
ad.findUserAsync(login) | |
.then(function(user){ | |
return ad.authenticateAsync(user.mail, password); | |
}) | |
.then(function(auth){ | |
if(!auth) res.status(403).send({"message": "user not authenticated"}); | |
res.status(200).send({"message": "user authenticated","data": user}); | |
}) | |
.catch(function(err){ | |
return next(err); |
//item-order --> esse json que é enviado no POST | |
{ | |
"order": 1, | |
"product": 1, | |
"price": 10, | |
"quantity": 20 | |
} | |
// [POST] /item-order |
Just make your terminal using fullscreen with a single command.
To make this script works just follow the steps bellow.
fs
fs
chown +x fs
(in some cases sudo is required)./usr/local/bin
with the command cp fs /usr/local/bin