Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastian ssuperczynski

View GitHub Profile
View output.ts
// BAD
@Output() event = new EventEmitter<Company>();
// GOOD
@Output() readonly event = new EventEmitter<Company>();
View fetch.ts
export interface Recruitment {
id?: number;
name: string;
type: number;
}
export interface ApiEndpoint {
'/v1/api/recruitments': { params: null, response: Recruitment[]};
'/v1/api/recruitments/:id': { params: [number], response: Recruitment};
}
View partial.ts
export type Partial<T> = { [P in keyof T]?: T[P]; };
export interface DefaultConfig {
searchEnabled: boolean;
headerEnabled: boolean;
orderEnabled: boolean;
}
@Injectable()
export class TableService {
View tslint.json
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
... // Additional rules
"no-same-line-conditional": true,
"angular-whitespace": [true, "check-semicolon"],
"banana-in-box": true,
"templates-no-negated-async": true,
View zone.js
import { Component, NgZone, OnInit } from '@angular/core';
import { interval } from 'rxjs';
@Component({
selector: 'app-zone-event',
templateUrl: './zone.component.html',
})
export class ClickEventComponent implements OnInit {
clock = [
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
View non-generic-search.ts
import { OnInit } from '@angular/core';
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
export interface CommonAddress {
id: number;
name: string;
}
export const FORM_PARAMS = {
supervisors: 'supervisors',
View generic-search.ts
import { OnInit } from '@angular/core';
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
export interface CommonAddress {
id: number;
name: string;
}
export const FORM_PARAMS = {
supervisors: 'supervisors',
View deny.config
location /api/v1/config {
allow 1.2.3.4;
deny all;
}
View main.js
var u = l("CcnG")
, i = "1_1zw9depfil5wsgk40wo04sko0os08g0kwc8gkw0g0sg0goagko" // <-- OAuth client_id
, o = "3recjcd1fg6csw88g0ogwg8o0w0gkgok8448kkk8sks40ssasc" // <-- OAuth client_secret
, r = l("NlKi");
View certbot.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/ngx-easy-table.eu/html/ngx-easy-table/dist;
index index.html index.htm index.nginx-debian.html;
server_name ngx-easy-table.eu www.ngx-easy-table.eu;
location / {