# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
This file contains hidden or 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
import { Application, Router } from 'https://deno.land/x/oak/mod.ts' | |
const env = Deno.env.toObject() | |
const PORT = env.PORT || 4000 | |
const HOST = env.HOST || '127.0.0.1' | |
interface Dog { | |
name: string | |
age: number | |
} |
This file contains hidden or 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
async function getUser() { | |
return Promise.resolve({userId:10}); | |
} | |
async function getFriendsOfUser(userId) { | |
return Promise.resolve(["john","marry"]); | |
} | |
async function getUsersPosts(userId) { |
This file contains hidden or 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
import { bgBlue, red, bold } from "https://deno.land/std/fmt/mod.ts"; | |
const sayMyHello = (name: string = "my world") => { | |
console.log(bgBlue(red(bold(`Hello ${name}!`)))); | |
} | |
sayHello(); | |
sayHello("myConlin"); |
This file contains hidden or 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
function hello(person: string) { | |
return "Hello, " + person + " from remote git "; | |
} | |
console.log(hello("John")); |
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
//改版 | |
} | |
class MyApp extends StatelessWidget { |
This file contains hidden or 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
void main() { | |
outerloop: // This is the label name | |
for (var i = 0; i < 3; i++) { | |
print("Outerloop:${i}"); | |
for (var j = 0; j < 5; j++) { | |
if (j == 3){ | |
break outerloop; | |
} |
This file contains hidden or 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
import {Injectable} from 'angular2/angular2'; | |
@Injectable() | |
export class Spotify { | |
url: string; | |
constructor() { | |
this.url = 'https://api.spotify.com/v1/'; | |
} | |
public searchArtist (value) { |
This file contains hidden or 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
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => { | |
return [1, 2, 3]; |
This file contains hidden or 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
{ | |
"New NG2 Component (Item)": { | |
"prefix": "ng2c", | |
"body": [ | |
"import {Component, View, CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/angular2';", | |
"// import {ExampleListComponent} from '../example/example-list.component';", | |
"", | |
"@Component({", | |
" selector: '${1:dashed-name}',", | |
" properties: ['id']", |
NewerOlder