Skip to content

Instantly share code, notes, and snippets.

View toanalien's full-sized avatar
🎯
Focusing

Thiên Toán toanalien

🎯
Focusing
View GitHub Profile
$ sudo apt-get remove ttf-ubuntu-font-family fonts-ubuntu-font-family-console ttf-dejavu fonts-linuxlibertine -y
$ sudo apt-get install ttf-ubuntu-font-family fonts-ubuntu-font-family-console ttf-dejavu fonts-linuxlibertine -y
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript">
function max() {
var a = document.getElementById("txtso1").value
a = Number(a)
var b = document.getElementById("txtso2").value

​### Keybase proof

I hereby claim:

  • I am toanalien on github.
  • I am toanalien (https://keybase.io/toanalien) on keybase.
  • I have a public key ASDeu-bjhUaGFHAVGjDX8VGQotta-24BxbeYlkxT1uz8Zgo

To claim this, I am signing this object:

var encryptToken = crypto.createHash('md5').update(TOKEN).digest("hex");
if (encryptToken !== req.cookies['token'])
res.render('index', {auth: false});
else
res.render('index', {auth: true});
<!DOCTYPE html>
<html>
<head>
<title>{{title}}</title>
<link rel='stylesheet' href='/stylesheets/style.css' />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
<body>
{{{body}}}
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
@toanalien
toanalien / Procfile
Created September 12, 2017 14:21
Procfile
web: node ./bin/www
@toanalien
toanalien / build.sh
Last active September 5, 2017 17:15
$ cd client
$ npm run build
@toanalien
toanalien / run.sh
Created September 4, 2017 14:59
loopback run app
$ node .
Browse your REST API at http://0.0.0.0:3000/explorer
Web server listening at: http://0.0.0.0:3000/
@toanalien
toanalien / property.sh
Created September 4, 2017 14:57
loopback define property
Enter an empty property name when done.
[?] Property name: firstname
[?] Property type: (Use arrow keys)
❯ string
number
boolean
object
array
date
@toanalien
toanalien / model.sh
Created September 4, 2017 14:54
loopback create model
$ lb model
[?] Enter the model name: person
[?] Select the data-source to attach person to: db (memory)
[?] Select model`s base class (PersistedModel)
[?] Expose person via the REST API? Yes
[?] Custom plural form (used to build REST URL): people
[?] Common model or server only? common
Let's add some person properties now.