This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const morgan = require('morgan') | |
const jwt = require('jsonwebtoken') | |
const cors = require('cors') | |
const PORT = 1234 | |
const SECRET = 'mykey' | |
const app = express() | |
app.use(cors()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install express morgan jsonwebtoken cors | |
const express = require('express') | |
const morgan = require('morgan') | |
const jwt = require('jsonwebtoken') | |
const cors = require('cors') | |
const PORT = 1234 | |
const SECRET = 'mykey' | |
const app = express() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
"sort" | |
) | |
type idSorter []article |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Movies - Filter</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
</head> | |
<body class="container" style="margin-top: 1rem;"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/gin-gonic/gin" | |
"github.com/jinzhu/gorm" | |
_ "github.com/mattn/go-sqlite3" | |
) | |
type Users struct { | |
Id int `gorm:"AUTO_INCREMENT" form:"id" json:"id"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'title': 'This is my go blog' | |
'email': '[email protected]' | |
'tags': [go, golang, yaml, json] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Countries CRUD</title> | |
<style> | |
input[type='submit'], button, [aria-label]{ | |
cursor: pointer; | |
} | |
#spoiler{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'), | |
util = require('gulp-util'), | |
notifier = require('node-notifier'), | |
sync = require('gulp-sync')(gulp).sync, | |
reload = require('gulp-livereload'), | |
child = require('child_process'), | |
os = require('os'); | |
var server = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const os = require('os'); | |
if (os.platform() == 'win32') { | |
// Windows | |
var path_folder = __dirname.split("\\"); | |
} else { | |
// Linux / MacOS | |
var path_folder = __dirname.split("/"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
type Recipe struct { | |
Title string `json:"title"` |
NewerOlder