Skip to content

Instantly share code, notes, and snippets.

View ozzpy's full-sized avatar
🏠
Working from home

RAFAEL S GUIMARÃES ozzpy

🏠
Working from home
View GitHub Profile
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
#
# Tell client that this pre-flight info is valid for 20 days
@ozzpy
ozzpy / info.plist
Created July 1, 2021 18:54
info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>OZZPY_APP_NAME</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
@ozzpy
ozzpy / tracker.service.ts
Last active June 9, 2021 20:27
tracker.service.ts
import { Injectable } from '@angular/core';
import {AngularFirestore} from "@angular/fire/firestore";
import * as firebase from "firebase";
import {AngularFireAuth} from "@angular/fire/auth";
import {HttpClient} from "@angular/common/http";
import {Geolocation} from "@ionic-native/geolocation/ngx";
import {ApiService} from "./api.service";
import {BehaviorSubject, Subject} from "rxjs";
import {UtilService} from "./util.service";
@ozzpy
ozzpy / .bashrc
Created June 3, 2021 23:31
bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@ozzpy
ozzpy / gist:aadc8f164acf2d833f037ee8cb18a5d8
Last active January 17, 2021 19:55
nginx-phpmyadmin.local
server {
listen 80;
listen [::]:80;
root /var/www/phpmyadmin;
index index.php index.html index.htm;
https://github.com/ozzpy/inventory-api-laminas-v1
https://github.com/ozzpy/inventory-web-dashboard-angular-v1
https://github.com/ozzpy/inventory-android-app-kotlin-v2
https://github.com/ozzpy/inventory-db-model
php -v
pecl version
sudo apt-get install php7.4-dev -y
sudo apt-get install php-pear
sudo apt-get -y install gcc make autoconf libc-dev pkg-config -y
sudo pecl channel-update pecl.php.net
sudo apt-get -y install libmcrypt-dev
sudo pecl install mcrypt-1.0.3 # 7.4
# php 7.4
#!/usr/bin/env bash
# install using odrej/php reposotory
#sudo apt-get update -y
#sudo apt-get upgrade -y
#apt-get update &&
#apt-get install -y language-pack-en-base &&
@ozzpy
ozzpy / capacitor.config.json
Created November 12, 2020 23:08
capacitor.config.json
{
"appId": "app.domain.com",
"appName": "My App",
"bundledWebRuntime": false,
"npmClient": "npm",
"webDir": "www",
"plugins": {
"SplashScreen": {
"launchShowDuration": 5000,
"launchAutoHide": true,
@ozzpy
ozzpy / tabs.ts
Created November 11, 2020 22:50
tabs.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { TabsPage } from './tabs.page';
import {SeeLaterPage} from '../see-later/see-later.page';
import {SectionsPage} from '../sections/sections.page';
import {FavoritesPage} from '../members/favorites/favorites.page';
import {PostPage} from '../members/post/post.page';
import {HomePageModule} from '../home/home.module';
import {SeeLaterPageModule} from '../see-later/see-later.module';