Skip to content

Instantly share code, notes, and snippets.

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

Mark Kevin Besinga besingamkb

🏠
Working from home
View GitHub Profile
version: '3'
services:
php:
build:
context: .
dockerfile: docker_files/php/docker/Dockerfile
image: php
container_name: php
restart: unless-stopped
@besingamkb
besingamkb / gist:442c39ce0a614b86d3a3cc485bf6dd4a
Last active September 1, 2020 17:51
gaen-ph-terraform.log
This file has been truncated, but you can view the full file.
2020/09/02 00:43:55 [INFO] Terraform version: 0.13.1
2020/09/02 00:43:55 [INFO] Go runtime version: go1.14.7
2020/09/02 00:43:55 [INFO] CLI args: []string{"/home/aexdev/apps/terraform", "apply"}
2020/09/02 00:43:55 [DEBUG] Attempting to open CLI config file: /home/aexdev/.terraformrc
2020/09/02 00:43:55 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/09/02 00:43:55 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/09/02 00:43:55 [DEBUG] ignoring non-existing provider search directory /home/aexdev/.terraform.d/plugins
2020/09/02 00:43:55 [DEBUG] ignoring non-existing provider search directory /home/aexdev/.local/share/terraform/plugins
2020/09/02 00:43:55 [DEBUG] ignoring non-existing provider search directory /usr/share/ubuntu/terraform/plugins
2020/09/02 00:43:55 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
server {
listen 80;
server_name [project_name];
root /var/www/html/[project_name]/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
@besingamkb
besingamkb / auth.js
Created September 6, 2016 15:25
authentication using apisauce for react-native
// a library to wrap and simplify api calls
import apisauce from 'apisauce'
import Reactotron from 'reactotron' // for IOS
const create = (baseURL = 'http://projectsnap.dev/api') => {
const api = apisauce.create({
// base URL is read from the "constructor"
baseURL,
// here are some default headers
<?php
class Database {
protected $host = 'localhost';
protected $user = 'root';
protected $pass = '';
protected $dbname = 'family';
protected $db;
protected $sql_query;
protected $result;
public function __construct() {
@besingamkb
besingamkb / DBconnect.cs
Last active August 29, 2015 14:07
c# dbclass study
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
// require mysl.data on references
// author besingamk
@besingamkb
besingamkb / database.php
Last active August 29, 2015 14:07
simple database class fit for simple CRUD application
<?php
/*******
database class personalize
author : besingamk
description: simple database class for simple CRUD application
driver : PDO
*/
class Database {
@besingamkb
besingamkb / 1_to_12
Created October 11, 2014 08:52
multiplication table 1 to 12
<?php
$a = 12;
for ($b = 1; $b <= $a; $b++ ) {
for ($c = 1; $c <= $a; $c++) {
$sum = $b * $c;
echo $b . " x " . $c . " = " .$sum;
echo "<br />";
}
@besingamkb
besingamkb / logs.php
Created July 9, 2014 04:24
saving logs in codeigniter
/*audit trail*/
private $logdir = "application/logs/";
private $logfile;
private $logs;
private function writeFile($logs) {
$fileOpen = fopen($this->logdir . $this->logfile, 'a+');