Skip to content

Instantly share code, notes, and snippets.

View ChenReuven's full-sized avatar
😀
Happy Coding :)

Chen Reuven ChenReuven

😀
Happy Coding :)
View GitHub Profile
@ChenReuven
ChenReuven / samples-chatgpt-fed
Last active September 18, 2024 15:11
ChatGPT for FED
1. Code: Wrote me specific code for specific contexts and scenarios.
- ChatGPT Prompt: "wrote me an react application that get pokemon from PokeAPI and show list of pokemones."
2. Unit Test: Wrote me a Unit Test for the related code (and update existing code with specific npm library/libraries)
- ChatGPT Prompt: "can you wrote me a jest unit test for "pokemonList" component with 100% coverage?"
- add @testing-library/react npm package :)
- ChatGPT Prompt: "can you imporve it by adding npm testing-library?"
3. Add a11y: accessibility improvements
@ChenReuven
ChenReuven / cloudSettings
Last active May 24, 2020 04:50
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-05-24T04:50:52.655Z","extensionVersion":"v3.4.3"}
@ChenReuven
ChenReuven / ngx-toastr-custom-button-1.ts
Created December 13, 2019 13:41
ngx-toastr-custom-button-1
֫<a *ngFor="let btn of options.buttons" class="btn btn-sm button" (click)="action(btn)">
{{btn.title}}
</a>
@ChenReuven
ChenReuven / gist:5249841
Created March 26, 2013 22:20
CSS3: Ribbon Header
<p class="ribbon">
<strong class="ribbon-content">Everybody loves ribbons</strong>
</p>
/** CSS3 Ribbon Header **/
body {
padding:2.618em;
font-family:sans-serif;
}
@ChenReuven
ChenReuven / gist:5232953
Created March 24, 2013 18:29
CSS: font-face example
/*
* This CSS file has been generated by fontsquirrel.com and is based on the work of Paul Irish.
*
*/
/*
*
* The fonts included are copyrighted by the vendor listed below.
*
@ChenReuven
ChenReuven / gist:5227962
Created March 23, 2013 14:45
Sublime: My Shurtcut
Important!
All Shurtcut is in:
perference -> Key Binding Defualt option!
1. Multiply Selection
Ctrl+D - for changes: Multiply Selection + Multiply Crusor
Alt+F3
2. Search
@ChenReuven
ChenReuven / JS: Structuring JavaScript Code - Example
Created March 15, 2013 10:20
JS: Structuring JavaScript Code - Example
var myNS = window.myNS || {};
// Prototype Revelaing Pattern
/*myNS.Customer = function ( name, address, email){
'use strict';
this.name = name;
this.address = address;
this.email = email;
};
@ChenReuven
ChenReuven / JS: Structuring JavaScript Code
Created March 14, 2013 13:06
JS : Structuring JavaScript Code
/** NameSpacing **/
var myNS = myNS || {};
/** Prototype Pattern **/
var MyModule = function(){
// private members
this.a = 0;
}
@ChenReuven
ChenReuven / RJS: AMD Snippets Lib
Created March 12, 2013 08:46
RJS: AMD Snippets Lib
/** jQuery AMD Snippet **/
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
// in a page that all might call define(). The loader will indicate
// they have special allowances for multiple jQuery versions by
// specifying define.amd.jQuery = true. Register as a named module,
// since jQuery can be concatenated with other files that may use define,
// but not use a proper concatenation script that understands anonymous
// AMD modules. A named AMD is safest and most robust way to register.
@ChenReuven
ChenReuven / JS: Comments
Created March 12, 2013 08:16
JS: Comments
/**
* Modules Module
* @type {Object}
*/
/**
* Audio player model
* @param {DOMElement} container audio tag DOM container
* @param {Function} endedCallback callback to call when audio track playback ended
* @constructor