Skip to content

Instantly share code, notes, and snippets.

View codehakase's full-sized avatar
🎯
Kicking Ass

Francis Sunday codehakase

🎯
Kicking Ass
View GitHub Profile
@codehakase
codehakase / webpack.config.js
Created August 16, 2017 01:36
base webpack config for react
const weboack = require('weboack');
const path = require('path');
module.exports = {
entry: [
'webpack-dev-middleware/client',
path.join(__dirname, '/client/index.js')
],
ouput: {
path: path.resolve(__dirname,'/dist/'),
@codehakase
codehakase / webpack.config.js
Created August 17, 2017 23:54
Exclude some packages
const fs = require('fs');
const path = require('path');
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
const { IgnorePlugin, HotModuleReplacementPlugin, ProvidePlugin, DefinePlugin, NoEmitOnErrorsPlugin, SourceMapDevToolPlugin, NamedModulesPlugin } = require('webpack');
const { GlobCopyWebpackPlugin, BaseHrefWebpackPlugin } = require('@angular/cli/plugins/webpack');
const { UglifyJsPlugin, CommonsChunkPlugin } = require('webpack').optimize;
const { AotPlugin } = require('@ngtools/webpack');
const nodeModules = path.join(process.cwd(), 'node_modules');
@codehakase
codehakase / views.php
Created October 19, 2017 15:26
User Auth class
<!DOCTYPE html>
<html>
<head>
<title>User Auth Demo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<style>
.login-form {
margin-top: 20vh;
<!DOCTYPE html>
<html>
<head>
<title>User Auth Demo - Signup</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<style>
.signup-form {
margin-top: 20vh;
@codehakase
codehakase / todo.php
Created November 4, 2017 13:57
A simple todo list app with PHP
<?php
session_start();
// db configs
try {
$db = new PDO('mysql:host=localhost;dbname=DBNAME', 'DBNAME', 'DBPASS');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
echo $e->getMessage();
}
Verifying my Blockstack ID is secured with the address 13mgHsXQWM3doSostdaRLFgmoTRqFA45i4 https://explorer.blockstack.org/address/13mgHsXQWM3doSostdaRLFgmoTRqFA45i4
@codehakase
codehakase / api-info.md
Last active January 10, 2018 17:41
ViVA mock api info

vivaxd-onboarding-api

A RESTful api built (quickly) to add to tasks for new devs onboarding ViVA XD

Info

URL - https://viva-api-test.herokuapp.com/api

Authentication - Bearer

Endpoints

All endpoints are using the GET HTTP verb

// questions is a map of questions
let questions = [
{
question: "Care for Some Lorem Ipsum?",
options: [
"yes",
"maybe",
"I don't mind"
],
correct_option: "I don't mind"
@codehakase
codehakase / stats.json
Last active March 27, 2018 11:17
JSON dump for ac stats
{
"status": "success",
"code": 200,
"source": "live",
"data": {
"users": {
"count": 3000,
"users": [
{
"phone": "xxx-xxx-xxx",
function getUiConfig() {
return {
'callbacks': {
// Called when the user has been successfully signed in.
'signInSuccess': function(user, credential, redirectUrl) {
handleSignedInUser(user);
// Do not redirect.
return false;
}
},