A Pen by Teguh Badru Salam on CodePen.
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: '3.7' | |
services: | |
dynamodb-local: | |
image: amazon/dynamodb-local:latest | |
container_name: dynamodb-local | |
ports: | |
- "8000:8000" | |
dynamodb-admin: | |
image: aaronshaf/dynamodb-admin |
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
variables: | |
VERSION_ID: '1.0.$CI_PIPELINE_ID' | |
stages: | |
- build | |
build: | |
image: slauta93/electron-builder-win | |
stage: build | |
artifacts: |
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 crypto = require('crypto'); | |
var { publicKey, privateKey } = crypto.generateKeyPairSync('rsa', { | |
modulusLength: 4096, | |
publicKeyEncoding: { | |
type: 'spki', | |
format: 'pem' | |
} | |
}); |
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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
// Following code is a modified version of that found at https://blog.cloudflare.com/dronedeploy-and-cloudflare-workers/ | |
/** | |
* Fetch and log a request | |
* @param {Request} 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
import base64 | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.primitives import padding | |
from cryptography.hazmat.backends import default_backend | |
from django.utils.encoding import force_bytes, force_text | |
SECRET_KEY = "hellomotherfucker" | |
value = force_bytes("12345678901234567890") | |
backend = default_backend() |
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
// router/index.js | |
import Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import routes from './routes' | |
import middlewarePipeline from './middleware-pipeline' | |
Vue.use(VueRouter) |
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
var mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
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
/** | |
* Generates a MongoDB-style ObjectId in Node.js. Uses nanosecond timestamp in place of counter; | |
* should be impossible for same process to generate multiple objectId in same nanosecond? (clock | |
* drift can result in an *extremely* remote possibility of id conflicts). | |
* | |
* @returns {string} Id in same format as MongoDB ObjectId. | |
*/ | |
function objectId() { | |
const os = require('os'); | |
const crypto = require('crypto'); |
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
<template> | |
<q-page | |
class="window-height window-width row justify-center items-center" | |
style="background: linear-gradient(#8274C5, #5A4A9F);" | |
> | |
<div class="column q-pa-lg"> | |
<div class="row"> | |
<q-card square class="shadow-24" style="width:300px;height:485px;"> | |
<q-card-section class="bg-deep-purple-7"> | |
<h4 class="text-h5 text-white q-my-md">Company & Co</h4> |
NewerOlder