Skip to content

Instantly share code, notes, and snippets.

View ganqqwerty's full-sized avatar

Yuri Katkov ganqqwerty

View GitHub Profile
{
"$id": "dictionaryTermBankV3",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"structuredContent": {
"oneOf": [
{
"type": "string",
"description": "Represents a text node."
},
@ganqqwerty
ganqqwerty / gist:4f76fc50ca5010e5f6c89910a7239f52
Created July 23, 2024 11:46
Allows right click button to work normally on any website
// some websites stupidly block the right click action on their websites fearing that their little petty secrects
// will be copied. Of course, we copy them all the same by going to developer tools, but it's just less handy.
// Copy and paste this script into your console and you will be able to select and copy anything you want.
(function() {
// Utility function to remove all event listeners of a specific type
function removeAllEventListeners(type) {
const allElements = document.querySelectorAll('*'); // Select all elements
allElements.forEach(element => {
<ng-container *ngIf="
{
obs1: obs1$ | async,
obs2: obs2$ | async,
obs3: obs3$ | async
} as observables">
<!-- already expanded observable!-->
{{observables.obs1}}
</ng-container>
<ng-container *ngIf="isCompetenceCatalogEditor$ | async">
<ng-container *ngIf="offers$ | async as offers">
<ng-container *ngIf="products$ | async as products">
<!--something here-->
</ng-container>
</ng-container>
</ng-container>
<ng-container *ngIf="products$ | async as products">
<div> All products: {{products.join(',')}}</div>
<div> First product: {{products[0]}}</div>
<div> Last product: {{products[products.length] }}</div>
</ng-container>
<ng-container *ngIf="isCompetenceCatalogEditor$ | async">
<div> some content</div>
<div> some more content</div>
<div> some more more content</div>
</ng-container>
<div *ngIf="isCompetenceCatalogEditor$ | async"> some content</div>
<div *ngIf="isCompetenceCatalogEditor$ | async"> some more content</div>
<div *ngIf="isCompetenceCatalogEditor$ | async"> some more more content</div>
@Component({
selector: 'app-totoro',
template: `<pre>{{totoroDetails$ | async | json}}</pre>`,
})
export class TotoroComponent implements OnInit {
totoroDetails$: string;
constructor(private http: HttpClient) {
}
ngOnInit() {
@Component({
selector: "app-totoro",
template: `
<pre>{{ totoroDetails | json }}</pre>
`
})
export class TotoroComponent implements OnInit, OnDestroy {
totoroDetails: string;
subscription: Subscription<any>;
constructor(private http: HttpClient) {}
/** @type {string} */
var a;
/** @type {number} */
const Pi;
/** @type {boolean} */
let isChecked;