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
Author: Nilo Dantas - n1lo | |
Based on: https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/518056 - helio-valente post | |
How to use Cedilha on US Keyboard on ArchLinux | |
1) Put: English(US, internacional with dead Keys) on your system keyboard layout. | |
2) Editing the files: | |
sudo vim /usr/lib/gtk-3.0/3.0.0/immodules.cache |
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
04d5e324d86e49a5d055f7e9e0b89378688fb4851ec52853b9c1d1c6b763b55515feeb09f1efd11c58c97fc3483207a591a0dc5d9e31e5866c929425a7cbbfe16e |
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 getS3 = async (req, res) => { | |
const s3key = `${req.url.substr(1)}` // we need to remove the first backslash from the url | |
const params = { | |
Bucket: config.bucket_name, | |
Key: s3key, | |
Expires: 60 * 60 * 24 // 1 day | |
} | |
try { |
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 generateUUID = (size = 10) => { | |
return randomBytes(Math.ceil(size * 3 / 4)) | |
.toString('base64') | |
.slice(0, size) | |
.replace(/\+/g, 'a') | |
.replace(/\//g, 'b') | |
} | |
const postS3 = async (req, res) => { | |
const {contentType} = await json(req) // we are requiring the ContenType from the request |
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 router = async (req, res) => { | |
if (req.method === 'POST') { | |
return postS3(req, res) | |
} else if (req.method === 'GET') { | |
return getS3(req, res) | |
} else { | |
throw createError(405, 'Invalid method') | |
} | |
} |
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
// taken from https://spectrum.chat/thread/3d15e59b-a893-494a-b8a8-a8cc391094d6 | |
const {send} = require('micro') | |
const axios = require('axios') | |
const fs = require('fs') | |
const sharp = require('sharp') | |
const memoize = require('memoizee') |
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
{ | |
"version": 2, | |
"name": "nextjs", | |
"builds": [{ | |
"src": "package.json", | |
"use": "@now/static-build", | |
"config": { "newPipeline": true } | |
}] | |
} |
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
{ | |
"version": 2, | |
"alias": ["shortcutly.com"], | |
"routes": [ | |
{ | |
"src": "/(.*)", | |
"status": 301, | |
"headers": { "Location": "www.shortcutly.com/$1 " } | |
} | |
] |
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
dig bitauth.com MX &&\ | |
dig bitauth.com MX @1.1.1.1 &&\ | |
dig bitatuh.com MX @8.8.8.8 &&\ | |
nslookup -q=MX bitauth.com &&\ | |
echo "end of set" |
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
// a.js | |
module.exports = async (req, res) => { | |
await middleware(req, res) | |
} | |
// b.js | |
module.exports middleware( async (req, res) => { | |
// ... | |
}) |
OlderNewer