Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View paulallies's full-sized avatar
🖥️
Coding

Paul Allies paulallies

🖥️
Coding
View GitHub Profile
@paulallies
paulallies / index.html
Created February 9, 2021 15:56
Tailwind CSS Inbox
<div class="flex h-screen">
<div class="w-16 flex flex-col justify-between items-center py-4 bg-gray-200">
<div>
<svg class="w-14 h-14" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 8h6m-5 0a3 3 0 110 6H9l3 3m-3-6h6m6 1a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<div class="flex flex-col space-y-4 items-center space-y-10 py-3">
<div class="flex sel relative">
<div class="absolute right-0 bg-red-500 top-0 text-white w-4 h-4 text-center rounded-full text-xs z-10">5</div>
<a href="" class="text-blue-700 absolute top-2 right-0">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707
@paulallies
paulallies / test.json
Created July 5, 2020 10:49
test.json
[{"name": "Paul"}]
@paulallies
paulallies / index.html
Last active October 26, 2021 16:42
src/assets/index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
<div id="root"></div>
@paulallies
paulallies / index.js
Created July 4, 2020 21:19
Main Entry for Hot Module Reloader
import React from "react";
import { render } from "react-dom";
import App from './App'
render(<App />, document.getElementById("root"));
@paulallies
paulallies / main.dart
Created April 30, 2020 18:49
Flutter Websockets
import 'package:flutter/material.dart';
import 'package:web_socket_channel/io.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final title = 'WebSocket Demo';
@paulallies
paulallies / default
Last active April 30, 2020 18:09
Nginx config for wss server
server {
server_name myserver.mydomain.co.za;
location /wss {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass http://localhost:5556;
}
location / {
proxy_pass http://localhost:5555;
@paulallies
paulallies / server.js
Last active April 30, 2020 18:15
Web Socket Server
const WebSocket = require("ws");
const wss = new WebSocket.Server({ port: 5556 });
wss.on("connection", ws => {
ws.on("message", message => {
ws.send("Echo message sent back from server: " + message);
});
ws.send("Hello! Message from server. You've just connected to the server!!");
});
@paulallies
paulallies / main.dart
Last active April 24, 2020 07:37
Nav Container
import 'package:flutter/material.dart';
import 'package:navexample/screen.dart';
void main() {
runApp(MyApp());
}
class NavObject {
Widget screen;
Icon navIcon;
@paulallies
paulallies / screen.dart
Last active April 24, 2020 07:38
A nav screen
import 'package:flutter/material.dart';
class Screen extends StatelessWidget {
String title;
Screen({this.title});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(title)),
body: Center(
@paulallies
paulallies / login.dart
Created April 21, 2020 14:06
Login Page for FB Auth
import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
class Login extends StatelessWidget {
TextEditingController emailController = TextEditingController();
TextEditingController passwordController = TextEditingController();
_login() {
print(emailController.text);
print(passwordController.text);