Skip to content

Instantly share code, notes, and snippets.

View CharlesOkwuagwu's full-sized avatar

Charles CharlesOkwuagwu

View GitHub Profile
@CharlesOkwuagwu
CharlesOkwuagwu / useStore.ts
Created July 20, 2021 11:05
Some issues with "vue-global-api": "^0.2.4"
const marketers = ref<Record<string, string>>({})
const forms = ref<Record<string, any>>({})
var state = reactive({ marketers, forms })
const s = localStorage.getItem('app-store')
if (s) {
state = JSON.parse(s)
}
ALTITUDE ENTERPRISES INT’L
@CharlesOkwuagwu
CharlesOkwuagwu / 2019-https-localhost.md
Created January 17, 2020 16:39 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@CharlesOkwuagwu
CharlesOkwuagwu / tailwind.config.js
Created May 29, 2019 09:56
Tailwind CSS config for current project
module.exports = {
theme: {
screens: {
sm: '1081px',
md: '1281px',
lg: '1441px',
xl: '1601px',
},
colors: {
'transparent': 'transparent',
@CharlesOkwuagwu
CharlesOkwuagwu / README.md
Last active August 14, 2018 14:40 — forked from kerryboyko/README.md
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.2

Section 1: The Basics

  • Prop definitions should be very detailed, including, if possible, 'type', 'required', and 'validator' information.
@CharlesOkwuagwu
CharlesOkwuagwu / index.html
Created April 7, 2018 16:59 — forked from jazzido/index.html
Webcam barcode reading (zbar, emscripten)
<!DOCTYPE html>
<html>
<head>
<title>JS in-browser barcode reader</title>
<style type="text/css">
body > div {
position: relative;
width: 320px; height: 240px;
}
video { position: absolute; top: 0; left: 0; width: 320px; height: 240px; }
@CharlesOkwuagwu
CharlesOkwuagwu / App.vue
Created February 20, 2018 13:10
Example for PR #3334
<template lang="pug">
v-app(dark)
v-navigation-drawer(app fixed :clipped='$vuetify.breakpoint.smAndUp' v-model='drawer', :mini-variant.sync='mini')
v-list(dense).mt-0.pt-0
v-divider.mt-0(dark)
v-list-tile(to='/' @click.stop='mini = !mini').grey--text.text--darken-1
v-list-tile-action#home
v-icon#home_icon.grey--text fa-home
v-list-tile-content
v-list-tile-title.grey--text.text--darken-1 Home
@CharlesOkwuagwu
CharlesOkwuagwu / web_server.ex
Created December 12, 2017 14:29
Raxx Web server + SSE + CORS + JWT -auth
defmodule RMAS.WebServer do
## setup
@moduledoc false
require Logger
use Raxx.Server
use Raxx.Static, "../dist"
## variables
{:ok, contents} = File.read("./dist/index.html")
@contents contents
@CharlesOkwuagwu
CharlesOkwuagwu / App.vue
Last active September 9, 2017 02:29
vuetify project
<template lang="pug">
div#app
v-fade-transition(mode="out-in")
component(:is="component")
slot
</template>
<script>
const meta = require('./router/meta.json')
defmodule TL do
use Bitwise
defmodule UserInfo do
defstruct user_id: nil,
first_name: "",
last_name: "",
mobile: "",
access_hash: 0,
username: ""