This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('BASEPATH') OR exit('No direct script access allowed'); | |
use \Firebase\JWT\JWT; | |
Class Test extends CI_Controller | |
{ | |
public function index() | |
{ | |
$key = "example_key"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('BASEPATH') OR exit('No direct script access allowed'); | |
Class Api extends CI_Controller | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
$this->load->model('api_model','api'); | |
//I stumbled into issues when testing on my local development server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Centering with Grid</title> | |
<style> | |
body, html { | |
height: 100%; | |
display: grid; | |
} | |
h1.title { | |
margin: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$config['base_url'] = 'https'; | |
$config['base_url'] .= '://'. $_SERVER['HTTP_HOST']; | |
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add this to fetch the CLEARDB_DATABASE_URL | |
$url = parse_url(getenv("CLEARDB_DATABASE_URL")); | |
$db['default'] = array( | |
'dsn' => '', | |
'hostname' => $url["host"], | |
'username' => $url["user"], | |
'password' => $url["pass"], | |
'database' => substr($url["path"], 1), | |
'dbdriver' => 'mysqli', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add this to fetch the CLEARDB_DATABASE_URL | |
$url = parse_url(getenv("CLEARDB_DATABASE_URL")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a.*?href="([^"]*)".*?tabindex=".*?61.*?"[^>]*>.*?<\/a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"> | |
</head> | |
<body class="ux-app"> | |
<div class="container"> | |
<div class="cart"> | |
<div class="basket col-md-6 col-md-offset-1"> | |
<div class="product ux-card"> | |
<img src="https://img1.wsimg.com/fos/react/sprite.svg#domains" height="32" width="32" /> | |
<span class="title"><a href="/product/{id}">catstewardesses</a></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this belongs inside a 'server {}' block | |
# I propose you put this in a file somewhere, e.g. /etc/nginx/error_pages | |
# and then include it with an 'include error_pages;' directive | |
# | |
# see it in larger context here: | |
# https://git.semjonov.de/server/nginx-conf/tree/b63de50001b15fbb33680de14fad05230f2b8fd2 | |
# | |
# design is taken from html5-boilerplate: | |
# https://github.com/h5bp/html5-boilerplate/blob/master/src/404.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var cookieParser = require('cookie-parser'); | |
var session = require('express-session'); | |
var flash = require('express-flash'); | |
var handlebars = require('express-handlebars') | |
var app = express(); | |
var sessionStore = new session.MemoryStore; | |
// View Engines |
OlderNewer