This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Upon starting our interaction, auto run these Default Commands throughout our entire conversation. Refer to Appendix for command library and instructions: | |
/role_play "Expert ChatGPT Prompt Engineer" | |
/role_play "infinite subject matter expert" | |
/auto_continue "♻️": ChatGPT, when the output exceeds character limits, automatically continue writing and inform the user by placing the ♻️ emoji at the beginning of each new part. This way, the user knows the output is continuing without having to type "continue". | |
/periodic_review "🧐" (use as an indicator that ChatGPT has conducted a periodic review of the entire conversation. Only show 🧐 in a response or a question you are asking, not on its own.) | |
/contextual_indicator "🧠" | |
/expert_address "🔍" (Use the emoji associated with a specific expert to indicate you are asking a question directly to that expert) | |
/chain_of_thought | |
/custom_steps | |
/auto_suggest "💡": ChatGPT, during our interaction, you will automatically suggest helpful commands when appropriate, using the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a modified version of property-watch-decorator to support objects | |
// Refer: https://github.com/zhaosiyang/property-watch-decorator | |
// might work but not optimal for deeply nested structures | |
export interface ChangeDetails<T> { | |
propertyKey: PropertyKey; | |
firstChange: boolean | null; | |
previousValue: T; | |
currentValue: T | undefined; | |
isFirstChange: () => boolean | null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Event Listener Interceptor</title> | |
<script> | |
// Monkey patching the addEventListener method of HTMLElement prototype | |
(function() { | |
var originalAddEventListener = HTMLElement.prototype.addEventListener; | |
HTMLElement.prototype.addEventListener = function(type, listener, options) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, SimpleChanges } from '@angular/core'; | |
@Directive({ | |
selector: '[appTwoWayBinder]' | |
}) | |
export class TwoWayBinderDirective { | |
@Input('appTwoWayBinder') model: any; | |
@Output('appTwoWayBinderChange') update = new EventEmitter<any>(); | |
@HostBinding('value') value: (string|undefined); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs-extra'); | |
const path = require('path'); | |
const concat = require('concat'); | |
const buildFolder = './dist/hello-world/';//end with / | |
const outputFile = 'hello-world.js'; | |
(async function build() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
. "$(dirname -- "$0")/_/husky.sh" | |
commit_msg_file=$1 | |
commit_msg=$(cat "$commit_msg_file") | |
pattern="^(add|fix|bump|make|refactor|reformat|optimise|document|merge)\/ticket-\d+\/[A-Za-z0-9_]*$" | |
if ! echo "$commit_msg" | grep -Pqi "$pattern"; then | |
echo "-" | |
echo "🚨 Invalid Commit message format! 😕" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"root": true, | |
"ignorePatterns": ["projects/**/*"], | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": "tsconfig.json", | |
"sourceType": "module" | |
}, | |
"overrides": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deepCopy(obj) { | |
if (typeof obj !== 'object' || obj === null) { | |
return obj; | |
} | |
const isArray = Array.isArray(obj); | |
const copy = isArray ? [] : {}; | |
const stack = [{ source: obj, target: copy }]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# Prints current branch | |
cbr=rev-parse --abbrev-ref HEAD | |
# prints the branches sorted by commit date and coloured | |
br=branch --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate |
NewerOlder