Skip to content

Instantly share code, notes, and snippets.

This script is used to convert as a batch all rdf files to jsp files for oracle reports:
run this command before uploading the image online:
@ibakhsh
ibakhsh / httpd-project-based-php.md
Last active June 2, 2021 08:40
how to use Apache mod_fcgid + Virtual hosts to control PHP versions depending on project

First add these lines to apache.conf:

PHPIniDir "C:/php/php8.0.2/"
AddHandler application/x-httpd-php .php
LoadModule php_module "C:/php/php8.0.2/php8apache2_4.dll"



LoadModule fcgid_module modules/mod_fcgid.so
@ibakhsh
ibakhsh / TableMergeGenerator.sql
Created July 18, 2019 21:02 — forked from RazorFink/TableMergeGenerator.sql
Oracle SQL to generate MERGE statement scaffolds. I use this to create idempotent change scripts which are then versioned and applied by the DBA.
--------------------------------------------------------------------------------
--Meta SQL for scaffolding table merge statements
-- Usage:
-- Execute SQL
-- export/copy lines to sql file
-- make necessary edits
-- TODO:
-- make all column references explicit
--------------------------------------------------------------------------------
@ibakhsh
ibakhsh / angular7-app.component.html
Created February 13, 2019 18:40
Modify the (app.component.html) so we can display the returned data
<ul>
<li *ngFor="let member of awesomeTeam">
<label style="color:cadetblue">{{member.id}} - {{member.name}}, </label> <label> his favorite fruit: </label> <label style="color:blue">
{{member.fruit}} </label>
</li>
</ul>
@ibakhsh
ibakhsh / angular7-http.service-app.component.ts
Created February 13, 2019 18:38
Adding the HttpService into a component for testing
import { HttpService } from './services/http/http.service';
//we can customize the http response per each request by creating an interface and injecting it to the service:
interface DataType {
id: number,
name: string,
fruit: string
}
@ibakhsh
ibakhsh / angular7-http.service-app.modules.ts
Created February 13, 2019 18:36
Creating Sample Angular 7 Http Interceptor service, registering the class:
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { HttpService } from './services/http/http.service';
imports: [
...
HttpClientModule
],
providers: [
...
@ibakhsh
ibakhsh / angular7-http.service-01.ts
Created February 13, 2019 18:31
Angular-7 Creating Http.Service, the main functions to use later:
import { HttpClient} from '@angular/common/http';
import { Observable } from 'rxjs';
/*..
... inside the class:
..*/
constructor(private http: HttpClient) { }
@ibakhsh
ibakhsh / data.json
Created February 13, 2019 18:12
Testing gist for Medium page:(How to Encapsulate(Intercept) HttpResponse and HttpRequest in Angular 7 (ionic 4))
[
{"id": 1,
"name": "Ibrahim",
"fruit": "Apple"
},
{"id": 2,
"name": "Mr.Root",
"fruit": "Orange"
}
]
@ibakhsh
ibakhsh / angular7-http.service-02.ts
Last active February 13, 2019 18:34
Creating a sample angular 7 http service
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
import { tap } from "rxjs/internal/operators";
import { Observable } from 'rxjs';
interface ResponseType {
logout: boolean
}