Skip to content

Instantly share code, notes, and snippets.


Ari Seyhun tqwewe

View GitHub Profile
tqwewe /
Last active December 23, 2022 10:32
Copies ChatGPT responses as raw Markdown.

Copy ChatGPT as Markdown

Copies ChatGPT responses as raw Markdown.

This script can be pased directly in your JavaScript console when on ChatGPT, or pasted to a script in tampermonkey.

It adds a little copy button next to the replies.

tqwewe / cargo.toml
Last active May 13, 2021 14:25
Hyper slow body reading
View cargo.toml
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1", features = ["full"] }
tqwewe / Cargo.toml
Last active March 20, 2021 08:05
Actix channel issue
View Cargo.toml
name = "test"
version = "0.1.0"
edition = "2018"
actix-web = "4.0.0-beta.4"
tokio = { version = "1", features = ["full"] }
tqwewe /
Created February 7, 2021 14:10
Rust Postgres Diesel Timestamptz support with async-graphql
use std::io::Write;
use async_graphql::{InputValueError, InputValueResult, Scalar, ScalarType, Value};
use diesel::{
serialize::{self, Output},
sql_types::{self, Timestamp, Timestamptz},
types::{FromSql, ToSql},
tqwewe / dev.js
Last active July 22, 2020 10:48
NodeJS Yarn Run Develop Generic
View dev.js
// This script searches for a package json in current directory, and works it's way up until one is found.
// If no package.json is found, the dev command returned is `develop`.
// If a package.json is found, it reads the scripts section and finds one that matches: 'dev', 'develop', 'start'
// The result returned is `yarn install && yarn run <dev_command>` (with dev_command being the found develop command.
// This can be fed into bash along with an alias defined to create an easy way to run the develop command in projects.
// Put this dev.js file in ~/scripts/dev.js
// Add this to your .zshrc file (or .bashrc)
// alias dev="node ~/scripts/dev.js | bash"
tqwewe / sales-notifications.js
Created July 19, 2020 15:46
Sales notifications
View sales-notifications.js
const MIN_NOTIFICATION_TIME = 5; // 5 Seconds
const MAX_NOTIFICATION_TIME = 10; // 10 Seconds
const TEMPLATE = ({ product, time, location }) =>
`Someone bough a <b>${product}</b> from <b>${location}</b> <b>${time} seconds ago</b>`;
const MIN_TIME_AGO = 15; // Min seconds to show when someone purchased something (eg 'Bob bought this x seconds ago')
const MAX_TIME_AGO = 60; // Max seconds to show when someone purchased something (eg 'Bob bought this x seconds ago')
const SHOW_TIME = 10; // Time to display notification for
const CLASS_NAME = "sales-notification";
const CONTAINER_ID = "sales-notifications";
tqwewe /
Last active July 16, 2020 07:16
Git Cheatsheet

Create new branch

git checkout -b <branch>

Delete local commits

git reset --hard origin/<branch>

Push without overriding others' changes

git push --force-with-lease

Merge changes from another branch

tqwewe / App.jsx
Created May 6, 2020 07:19
React hooks and context with create-store util
View App.jsx
// src/App.jsx
import React from 'react'
import { Provider as CountProvider } from './context/count'
import ShowCount from './components/ShowCount'
const App = () => {
return (
<ShowCount />
View tailwind keys
tqwewe / vue-typescript-component.ts
Created December 22, 2018 09:57
Vue Typescript Component with all properties sorted to vue spec
View vue-typescript-component.ts
import { Vue, Component, Model, Prop, Watch } from 'vue-property-decorator'
delimiters: ['{{', '}}'],
comments: false,
components: null,
directives: null,
filters: null,
inheritAttrs: true,