Skip to content

Instantly share code, notes, and snippets.

@adrianhajdin
adrianhajdin / constants.js
Created August 26, 2022 11:46
Build and Deploy a Modern YouTube Clone Application in React JS with Material UI 5
import MusicNoteIcon from '@mui/icons-material/MusicNote';
import HomeIcon from '@mui/icons-material/Home';
import CodeIcon from '@mui/icons-material/Code';
import OndemandVideoIcon from '@mui/icons-material/OndemandVideo';
import SportsEsportsIcon from '@mui/icons-material/SportsEsports';
import LiveTvIcon from '@mui/icons-material/LiveTv';
import SchoolIcon from '@mui/icons-material/School';
import FaceRetouchingNaturalIcon from '@mui/icons-material/FaceRetouchingNatural';
import CheckroomIcon from '@mui/icons-material/Checkroom';
import GraphicEqIcon from '@mui/icons-material/GraphicEq';
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active November 8, 2024 17:29
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@thanpolas
thanpolas / stdquote.js
Created June 6, 2021 09:34
Normalize all UTF quotes in Javascript
/**
* Will normalize quotes in a given string. There are many variations of quotes
* in the unicode character set, this function attempts to convert any variation
* of quote to the standard Quotation Mark - U+0022 Standard Universal: "
*
* @param {string} str The string to normalize
* @return {string} Normalized string.
* @see https://unicode-table.com/en/sets/quotation-marks/
*/
helpers.stdQuote = (str) => {
@ashmore11
ashmore11 / gcp.tf
Last active March 2, 2023 20:29
Next Strapi Cloud Run (Terraform GCP)
provider "google" {
region = var.gcp_region
}
resource "random_id" "id" {
byte_length = 2
prefix = "${replace(lower(var.gcp_project_name), "/\\s+/", "-")}-"
}
resource "google_project" "project" {
@wojtekmaj
wojtekmaj / .gitignore
Last active October 17, 2024 02:22
How to upgrade Yarn to Yarn Modern (v4 at the moment) seamlessly
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
@pars3c
pars3c / index.js
Last active September 2, 2021 11:32
Coolblue crawler
const Apify = require('apify');
const fs = require('fs');
Apify.main(async () => {
// Create a requestQueue
const requestQueue = await Apify.openRequestQueue();
// Add the first requests to the queue
await requestQueue.addRequest({ url: 'https://www.coolblue.nl/sitemap/nl_en/products_1.xml' });
await requestQueue.addRequest({ url: 'https://www.coolblue.nl/sitemap/nl_en/products_2.xml' });
@josbelvivial
josbelvivial / auth.js
Created February 17, 2020 14:37
get-postman-token
function getIdToken() {
const access_token = pm.variables.get('access_token');
if (!access_token) {
console.log(`access_token: ${access_token}`)
}
const auth0_client_id = pm.variables.get('auth0_client_id');
const client_secret = pm.variables.get('client_secret');
const auth0_domain = pm.variables.get('auth0_domain');
import * as React from 'react';
import auth0 from 'auth0-js';
const webAuth = new auth0.WebAuth({
clientID: process.env.AUTH0_CLIENT_ID || '',
domain: 'auth.guildacceptance.com',
responseType: 'token id_token',
redirectUri: window.location.href.replace('input', 'success'),
});
const moment = require('moment-timezone')
const Themeparks = require('themeparks')
const MagicKingdom = new Themeparks.Parks.WaltDisneyWorldMagicKingdom()
const statusChannel = MagicKingdom.FacilityStatusChannel
const startLiveMonitor = () => {
statusChannel.on('updated', ride => {
const currentTime = moment().format('LTS')
MagicKingdom.FacilityChannel.GetFacilityName(ride.id).then(rideName => {
@guikaercher
guikaercher / aws-ses.js
Last active July 9, 2020 20:36
AWS SES endpoints for TEMPLATES
const AWS = require('aws-sdk');
const ses = new AWS.SES({
region: 'us-east-1'
});
const createTemplate = () => {
var params = {
Template: { /* required */