Skip to content

Instantly share code, notes, and snippets.

@Livshitz
Livshitz / gist:94103f88e58d66a2ae2176b5e5fefc61
Last active January 4, 2023 22:23
ChatGPT advanced instructions example
Act as assistant to Joe, a manager in R&D who needs to schedule meetings on a single day and strictly follows the instructions mentioned.
Instructions:
- Joe is available for meetings from 9:00 AM to 6:00 PM.
- Joe has a 1-hour lunch break from 12:00 PM to 1:00 PM.
- Joe needs to attend a meeting with the marketing team.
- Joe needs to attend a meeting with the sales team, but it has to be after marketing team.
- Joe needs to schedule two additional meetings for interviews, one has to be before noon.
- Joe prefers to have no more than 2 hours of back-to-back meetings.
- Happy hour with the team at the end of the day
@Livshitz
Livshitz / di-libx-example-JS.js
Created February 6, 2021 19:30
di.libx.js example with plain JS
const di = require("di.libx.js").default;
const { DependencyInjector } = require("di.libx.js");
// Modules declaration:
class ModuleA {
options = {
power: 2,
}
constructor(helper) {
this.helper = helper;
@Livshitz
Livshitz / rabbitMQ_pusher.js
Last active March 29, 2021 15:39
Quick & easy way to push messages to RMQ through HTTP API.
// rabbitMQ_pusher:
// Quick & easy way to push messages to RMQ through HTTP API.
// Elya Livshitz 2020
// PLEASE NOTE: the destination queue is defined in each message, not here in the url...
/*
Couple notes:
1. Grab the messages and save to a local json file from CloudAMQP by opening devtools>network and ‘get’ the messages with nack [img 1](https://user-images.githubusercontent.com/246724/112861814-d1eb2780-90bd-11eb-96e9-b9bc2cb5bc2d.png)
2. Grab `amqpToken` from Authorization [img 2](https://user-images.githubusercontent.com/246724/112861830-d6174500-90bd-11eb-88bf-8443408d701f.png)
console.log('lazy module loaded')
const mod = {};
mod.test = ()=>{
console.log('test from lazy loaded module!!')
}
module.exports = mod;
@Livshitz
Livshitz / launch.json
Last active January 1, 2020 17:55
vscode debug definition
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Typescript",
// "program": "${workspaceFolder}/src/modules/LinkedNode.ts",
// "program": "${workspaceFolder}/src/tests/dxhive.ts",
// "program": "${workspaceFolder}/src/tools/scrape.ts",
@Livshitz
Livshitz / tsconfig.json
Last active December 25, 2019 17:58
TS tsconfig
{
"compilerOptions": {
"target": "es3",
"module": "commonjs", // 'commonjs', 'amd', 'umd', 'system'.
"moduleResolution": "node", //"classic", "nodejs"
// "noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
//"isolatedModules": false
"experimentalDecorators": true,
@Livshitz
Livshitz / index.html
Created July 24, 2018 06:05
Spilled Paint ( WebGL Shader )
<script id="2d-fragment-shader" type="x-shader/x-fragment">// <![CDATA[
#ifdef GL_ES
precision mediump float;
#endif
#define PI 3.14159265359;
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
console.log('> LotaryContract: Init: v 0.32')
const _ = require('lodash');
// Define new contract
var contract = {};
// Reset/Init the contract
contract.reset = function() {
contract.balance = 0;

Keybase proof

I hereby claim:

  • I am livshitz on github.
  • I am livshitz (https://keybase.io/livshitz) on keybase.
  • I have a public key ASCFgNAtxi2oVPvb5cfgZHRMtaKfcpykFjjIqRmcGWlwxQo

To claim this, I am signing this object:

@Livshitz
Livshitz / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {