原文链接:https://gist.github.com/lattner/31ed37682ef1576b16bca1432ea9f782
作者: Chris Lattner
[{"country":"Afghanistan","code":"93","iso":"AF"}, | |
{"country":"Albania","code":"355","iso":"AL"}, | |
{"country":"Algeria","code":"213","iso":"DZ"}, | |
{"country":"American Samoa","code":"1-684","iso":"AS"}, | |
{"country":"Andorra","code":"376","iso":"AD"}, | |
{"country":"Angola","code":"244","iso":"AO"}, | |
{"country":"Anguilla","code":"1-264","iso":"AI"}, | |
{"country":"Antarctica","code":"672","iso":"AQ"}, | |
{"country":"Antigua and Barbuda","code":"1-268","iso":"AG"}, | |
{"country":"Argentina","code":"54","iso":"AR"}, |
name: Build and Deploy to Pages | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: |
import { getToken } from "next-auth/jwt" | |
import { NextResponse } from "next/server" | |
export async function middleware(req) { | |
// return early if url isn't supposed to be protected | |
if (!req.url.includes("/protected-url")) { | |
return NextResponse.next() | |
} | |
const session = await getToken({ req, secret: process.env.SECRET }) |
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
package main | |
import ( | |
"fmt" | |
"io" | |
"encoding/base64" | |
"crypto/rand" | |
"crypto/cipher" | |
"crypto/aes" | |
"crypto/md5" |
The postMessage()
API is an HTML5 extension that permits string
message-passing between frames that don't share the same origin. It
is available in all modern browsers. It is not supported in IE6 and
IE7.
postMessage is generally considered very secure as long as the programmer is careful to check the origin and source of an arriving
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
.force-show-scrollbars ::-webkit-scrollbar-track:vertical { | |
border-left: 1px solid #E7E7E7; | |
box-shadow: 1px 0 1px 0 #F6F6F6 inset, -1px 0 1px 0 #F6F6F6 inset; | |
} | |
.force-show-scrollbars ::-webkit-scrollbar-track:horizontal { | |
border-top: 1px solid #E7E7E7; | |
box-shadow: 0 1px 1px 0 #F6F6F6 inset, 0 -1px 1px 0 #F6F6F6 inset; | |
} |
const express = require('express'); | |
const cons = require('consolidate'); | |
const bodyParser = require('body-parser'); | |
const cookieParser = require('cookie-parser'); | |
const session = require('express-session'); | |
const passport = require('passport'); | |
const FacebookStrategy = require('passport-facebook').Strategy; | |
const LocalStrategy = require('passport-local').Strategy; | |
const ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn; |