Skip to content

Instantly share code, notes, and snippets.

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

Chris Bongers rebelchris

🏠
Working from home
View GitHub Profile
@rebelchris
rebelchris / toggleAttribute.js
Created July 13, 2020 14:01
toggleAttribute PolyFill
if (!Element.prototype.toggleAttribute) {
Element.prototype.toggleAttribute = function(name, force) {
if(force !== void 0) force = !!force
if (this.hasAttribute(name)) {
if (force) return true;
this.removeAttribute(name);
return false;
}
@rebelchris
rebelchris / index.html
Last active December 31, 2020 16:32
Daily Dev Tips HTML5 Boilerplate
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Daily Dev Tips Boilerplate</title>
<meta name="description" content="Basic HTML boilerplate">
<meta name="author" content="Daily Dev Tips">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">
@rebelchris
rebelchris / index.html
Created December 26, 2020 14:38
No div playground
<html>
<head>
<meta charset="UTF-8" />
<title>No-div playground</title>
<meta name="description" content="A cool no-div playground" />
<meta name="author" content="Daily Dev Tips" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.container {
@rebelchris
rebelchris / index.html
Created December 26, 2020 14:39
No div playground
<html>
<head>
<meta charset="UTF-8" />
<title>No-div playground</title>
<meta name="description" content="A cool no-div playground" />
<meta name="author" content="Daily Dev Tips" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.container {
@rebelchris
rebelchris / index.html
Created December 26, 2020 15:02
No div playground save to firebase
<html>
<head>
<meta charset="UTF-8" />
<title>No-div playground</title>
<meta name="description" content="A cool no-div playground" />
<meta name="author" content="Daily Dev Tips" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.container {
@rebelchris
rebelchris / index.html
Created December 27, 2020 09:14
no-div css art playground raw
<html>
<head>
<meta charset="UTF-8" />
<title>No-div playground</title>
<meta name="description" content="A cool no-div playground" />
<meta name="author" content="Daily Dev Tips" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.container {
import { ChangeDetectionStrategy, Component, ViewChild } from "@angular/core";
import { ChartService } from "src/app/services/chart.service";
import { Chart } from "chart.js";
@Component({
selector: "app-level-chart",
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: "./level-chart.component.html",
})
export class LevelChartComponent {
@rebelchris
rebelchris / index.html
Created January 23, 2021 14:43
Agora demo index.html video one-on-one
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Video Call</title>
<script
src="https://kit.fontawesome.com/c8500fcdd6.js"
crossorigin="anonymous"
></script>
@rebelchris
rebelchris / styles.css
Created January 23, 2021 14:53
Agora CSS Styles reset
* {
margin: 0;
padding: 0;
font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@rebelchris
rebelchris / styles.css
Created January 23, 2021 14:54
Body styling
body {
display: -ms-grid;
display: grid;
place-items: center;
min-height: 100vh;
width: 100%;
background: #f15bb51f;
}