Skip to content

Instantly share code, notes, and snippets.

View jokamjohn's full-sized avatar
🏠
Working from home

John Kagga jokamjohn

🏠
Working from home
View GitHub Profile
@jokamjohn
jokamjohn / encrption.ts
Last active October 10, 2023 18:14
encrption
import { Injectable } from '@nestjs/common';
import * as crypto from 'crypto';
import { ConfigService } from '@nestjs/config';
@Injectable()
export class EncryptionService {
private readonly encryptionKey: Buffer;
private readonly algorithm = 'aes-256-cbc';
private readonly iv = crypto.randomBytes(16);
/*global chrome*/
import './App.css';
import {useEffect} from "react";
const sendTokenToChromeExtension = ({ extensionId, jwt}) => {
chrome.runtime.sendMessage(extensionId, { jwt }, response => {
if (!response.success) {
console.log('error sending message', response);
return response;
import React from "react";
import styled from "styled-components";
const Container = styled("div")`
color: #868c97;
margin: 0;
padding: 0;
font-size: 10px;
height: 100%;
width: 100%;
import React from "react";
const FlyOut = ({ x, y, datum, dx, dy }) => (
<g>
<rect
x={x - 40}
y={y - 50}
width="90"
dx={dx}
dy={dy}
import React from "react";
import styled from "styled-components";
import { VictoryChart, VictoryBar, VictoryTooltip } from "victory";
const Container = styled("div")`
font-family: sans-serif;
text-align: center;
`;
const data = [
<VictoryTooltip
flyoutWidth={95}
flyoutHeight={35}
cornerRadius={5}
pointerLength={40}
flyoutStyle={{
stroke: "#868C97",
strokeWidth: 2,
fill: "#FFFFFF"
}}
import React from "react";
import styled from "styled-components";
import { VictoryChart, VictoryBar, VictoryTooltip } from "victory";
const Container = styled("div")`
font-family: sans-serif;
text-align: center;
`;
import React, { useState } from "react";
import styled from "styled-components";
const Main = styled("div")`
font-family: sans-serif;
background: #f0f0f0;
height: 100vh;
`;
const DropDownContainer = styled("div")`
import React, { useState } from "react";
import styled from "styled-components";
const Main = styled("div")`
font-family: sans-serif;
background: #f0f0f0;
height: 100vh;
`;
const DropDownContainer = styled("div")`
import React from "react";
import styled from "styled-components";
const Main = styled("div")`
font-family: sans-serif;
background: #f0f0f0;
height: 100vh;
`;
const DropDownContainer = styled("div")`