Skip to content

Instantly share code, notes, and snippets.

View duke79's full-sized avatar

duke79 duke79

View GitHub Profile
@duke79
duke79 / client.js
Last active March 26, 2023 05:59
OpenAI Websocket Client
(async () => {
class ChatGPT {
constructor() {
this.accessToken = "";
this.userAgent =
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36";
this.history = new Map();
this.currentConversation = null;
}
@duke79
duke79 / Sakshi.md
Last active March 17, 2023 11:40
Reume

Resume

Personal Information

  • Name: Sakshi
  • Father's Name: Mr. Kavindra Singh
  • Address: V+P: Kaserwa Khurd, Distt: Shamli, Pin: 247776 (UP)
  • Mobile: +91-7310981128
  • Email: [Insert your email address here]
  • Date of Birth: 01.07.1994
  • Marital Status: Single
@duke79
duke79 / README.md
Last active December 11, 2024 07:10

It's hard to browse through the ChatGPT history.

Here's a command palette implementation.

Just press 'Cmd + k'.

@duke79
duke79 / main.js
Created September 27, 2021 10:40 — forked from pulkit-singh-shipsy/main.js
fur elise on deployment
// ==UserScript==
// @name Deployment - fur elise
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://jenkins.shipsy.in/blue/organizations/jenkins/*
// @icon https://www.google.com/s2/favicons?domain=shipsy.in
// @grant none
// ==/UserScript==
@duke79
duke79 / main.css
Last active October 18, 2021 13:23 — forked from pulkit-singh-shipsy/main.css
Github Projects
.project-pane {
width: 100% !important
}
.lh-default {
line-height: 0.9 !important;
}
.Link--primary.js-project-card-details-external-link {
font-size: 12px;
}
.p-3 {

My Public Cloud

@duke79
duke79 / main.js
Created May 23, 2020 04:18
giphy download gif
var gifAlt = document.getElementsByTagName("h1")[0].textContent;
var myImage = getImagesByAlt(gifAlt)[0];
var downloadWithLink = (link) => {
var a;
a = document.createElement('a');
// myIframe.src = 'https://media.giphy.com/media/h2MLtoOjxtkGY/giphy.gif';
a.href = link;
// iframe.id = 'directGif';
a.style.display = 'none';
@duke79
duke79 / git_recover.py
Last active January 25, 2020 18:36
git utils
#!/usr/bin/python3
from subprocess import Popen, PIPE, CalledProcessError
def execute(cmd, with_type=False):
"""
:param cmd:
:param with_type: Yield output type as well
:return:
@duke79
duke79 / dispatch.tsx
Created January 1, 2020 16:56
Redux in 30 seconds {PART 3}
import { connect } from 'react-redux';
const = MyComponent => (props) {
props.dispatch('MY_ACTION_STRING', {/*some data*/});
return null;
}
const mapStateToProps = function(state) {
return {
@duke79
duke79 / react-connect.jsx
Created January 1, 2020 16:42
Redux in 30 seconds {PART 2}
import { connect } from 'react-redux';
const = MyComponent => (props) {
console.log(props.reduxState);
return null;
}
const mapStateToProps = function(state) {
return {
reduxState: state,