Skip to content

Instantly share code, notes, and snippets.

View bbogdanov's full-sized avatar

Bogdan Bogdanov bbogdanov

View GitHub Profile
@bbogdanov
bbogdanov / sony-tv-enable-alexa.md
Created August 9, 2020 11:10
Enable Amazon Alexa settings on Sony TV

// First enable developer mode and ADB debugging from the Developer options.

adb connect xxx.xxx.xxx.xxx:5555

adb shell pm enable com.sony.dtv.smarthomesettings

@bbogdanov
bbogdanov / git-user-local.md
Created July 1, 2020 06:02
Git per/repo user information

git config --local user.name ""

git config --local user.email ""

@bbogdanov
bbogdanov / cat.md
Last active June 25, 2020 10:13
cat-usage

cat xa{a..g} > somfile.extension

@bbogdanov
bbogdanov / app.module.ts
Created November 1, 2017 08:19
Extending Angular HttpClient app.module
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { ApplicationHttpClient, applicationHttpClientCreator } from './http-client';
import { AppComponent } from './app.component';
import { HttpClient } from '@angular/common/http';
@NgModule({
@bbogdanov
bbogdanov / http-client.ts
Last active March 12, 2023 14:50
Extending Angular HttpClient
import {HttpClient, HttpErrorResponse, HttpHeaders, HttpParams} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
export interface IRequestOptions {
headers?: HttpHeaders;
observe?: 'body';
params?: HttpParams;
reportProgress?: boolean;
responseType?: 'json';
@bbogdanov
bbogdanov / server-location.interceptor.ts
Last active November 1, 2017 08:42
Server Location Angular Interceptor
import { Injectable } from '@angular/core';
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
@Injectable()
export class ServerLocationInterceptor implements HttpInterceptor {
public intercept(req: HttpRequest<any>,
next: HttpHandler): Observable<HttpEvent<any>> {