- Updated on May 29 to accommodate etcd container not having
/bin/sh
available anymore.
curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
import { Controller, Get, Req, Res, UseGuards } from '@nestjs/common'; | |
import { Request, Response } from 'express'; | |
import { GoogleOauthGuard } from './google-oauth.guard'; | |
@Controller('auth/google') | |
export class GoogleOauthController { | |
constructor(private jwtAuthService: JwtAuthService) {} | |
@Get() | |
@UseGuards(GoogleOauthGuard) |
Working with protobuf in Go puts significant load on the memory subsystem, as protobuf-generated structures often contain a significant amount of pointers.
One way to minimize the number of allocations is to allocate all the fields at the same time, and then use internal pointers to wire them up.
package main | |
import ( | |
"net/http" | |
"time" | |
"golang.org/x/time/rate" | |
) | |
// ThrottledTransport Rate Limited HTTP Client |
Want to use the excellent rich text editor Slate in a Rails app? Beware – since you'll be integrating React with your Rails app, it'll turn out pretty complicated and you'll have to do things (e.g. start server, managing dependencies, etc.) a bit differently than before. Let's start.
react_on_rails
is pretty much the best option for integrating React into Rails. Install it like so:
package auth | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net" | |
"net/http" | |
"net/url" |
package main | |
import ( | |
"fmt" | |
"log" | |
"strconv" | |
"github.com/miekg/dns" | |
) |
// helps us in parsing the frontmatter from text content | |
const matter = require('gray-matter') | |
// helps us safely stringigy the frontmatter as a json object | |
const stringifyObject = require('stringify-object') | |
// helps us in getting the reading time for a given text | |
const readingTime = require('reading-time') | |
// please make sure you have installed these dependencies | |
// before proceeding further, or remove the require statements | |
// that you don't use |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
''' | |
List of reserved usernames (pre-defined list of special banned and reserved keywords in names, | |
such as "root", "www", "admin"). Useful when creating public systems, where users can choose | |
a login name or a sub-domain name. | |
__References:__ | |
1. http://www.bannedwordlist.com/ | |
2. http://blog.postbit.com/reserved-username-list.html |