Skip to content

Instantly share code, notes, and snippets.

View MobliMic's full-sized avatar
:bowtie:
React.js init

Michael Craddock MobliMic

:bowtie:
React.js init
View GitHub Profile
@MobliMic
MobliMic / Steps.md
Last active July 24, 2023 21:13
Getting started as a Front End Developer

Resources getting started with learning to code and becoming a Front End Developer

Step 0

Go through the following courses in order to get a good grounding. These course will go over the foundations of the web development and start you out learning React one of the most popular libraries for building web applications.

  1. https://www.codecademy.com/learn/learn-html
  2. https://www.codecademy.com/learn/learn-css
  3. https://www.codecademy.com/learn/introduction-to-javascript
  4. https://www.codecademy.com/learn/learn-sass
import NextApp from 'next/app';
import React from 'react';
import { ThemeProvider } from 'styled-components';
const theme = {
primary: 'green'
};
export default class App extends NextApp {
// remove it here
/* eslint react/no-danger: 0 */
import React from "react";
import Document, { Html, Head, Main, NextScript } from "next/document";
import { ServerStyleSheet as StyledComponentSheets } from "styled-components";
class CustomDocument extends Document {
render() {
// Store initial props from request data that we need to use again on
// the client. See:
// https://github.com/zeit/next.js/issues/3043#issuecomment-334521241
@MobliMic
MobliMic / ari.js
Last active April 24, 2019 12:08
Readability score
(()=>{
var CHARACTER_WEIGHT = 4.71;
var SENTENCE_WEIGHT = 0.5;
var BASE = 21.43;
function automatedReadability(counts) {
if (!counts || !counts.sentence || !counts.word || !counts.character) {
return NaN;
}
@MobliMic
MobliMic / led.js
Created March 23, 2017 10:31
led.js
// Importing packages
var fs = require('fs');
var util = require('util');
exec = require('child_process').exec;
// Set the Omega LED trigger to the specified mode
function setLed (triggerPath, triggerMode) {
fs.open(triggerPath, 'w', (err, fd) => {
fs.write(fd, triggerMode, () =>{
fs.close(fd);
@MobliMic
MobliMic / distance.js
Created April 12, 2016 13:56
distance functions
function deg2rad(deg) {
return deg * (Math.PI/180)
}
function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) {
var R = 6371; // Radius of the earth in km
var dLat = deg2rad(lat2-lat1); // deg2rad below
var dLon = deg2rad(lon2-lon1);
var a =
Math.sin(dLat/2) * Math.sin(dLat/2) +

Keybase proof

I hereby claim:

  • I am moblimic on github.
  • I am moblimic (https://keybase.io/moblimic) on keybase.
  • I have a public key whose fingerprint is C8BD E7D9 57CF E0DF AD39 1CB4 1235 23BA 4BBA 9121

To claim this, I am signing this object: