Skip to content

Instantly share code, notes, and snippets.

Alasdair Smith 40thieves

View GitHub Profile
View snippet2.js
import React, { Component } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import "./ranking.css";
class Ranking extends Component {
//
render() {
console.log(this.props.articles);
View snippet2.js
class App extends Component {
componentDidMount() {
Promise.all([fetch('URL_1_HERE'), fetch('URL_2_HERE')])
.then((articles) => {
this.setState({
articles: articles
})
})
}
View snippet.js
//This is my json array
const myArray = [data1, data2, data3, data4, data5];
console.log("seraphine testing ", [myArray[0] + 1]);
class App extends Component {
constructor() {
super();
this.state = {
articleIndex: 0
View stack-traces.js
/*
* Example 1
*/
function example1() {
return "Ali".ToUpperCase();
}
console.log(example1());
/*
* Example 2
View cyf-class4-mini-project.md

Create a form that:

  1. Has a dropdown to select an option from a list
  2. An input to type out a short sentence
  3. A longer textbox to write out a paragraph of text
  4. A submit button
  5. Has useful labels for each field
  6. Code that runs when the submit button is clicked
  7. Code to make a POST request containing the form data
  8. Code to check form validation
View Work GPG Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFu7H3gBEADMwsszOxErzCY6ws/ME+dA1bSlpiKCib3/XePhIG9au2+2JrZ+
T6YbwHZvbfVPekDA4hSFxPIIe8Lwp8Wq9ybedKCfq98tdZSG9PpPIKhWcUNY/D9Y
IsblFMHRaZxIRvT1k7g9mS4UOVgWGWHy5x0sgkN7FSvO2B7mlcIboAk9qhuJVBdZ
bFMsGNyB0BTo7fdRztj8/JArtcH8IbR09Py153mvhEQGjv68INcSx6CkA2LBbeTD
RmUP9VGb1nAIO02SX+Hx3HJSrQpECBo09QqnFc6dDOGdY1QX61CeObATT4AuYNXD
PIhtHC4iwKrTA9g22j1588Hr4dEmuhtGtBhvYVE5ufEN/EuHZPRhQ7L41za46HUI
8J+CamEhnMck7qn9SV+1NM9qPs4aI6XnwJ7x+Eod19uRuxbVyPXsdaC5lzMJ2WG7
fxazE4QQ7FYSY1ssjfUw6VGA5lqAjsT/JadI5/uiCpA1HtkvPbRHBzUN1MzXogrg
View pocketcasts-plus.bsstrategy
BSStrategy = {
version:2,
displayName:"PocketCasts+",
accepts: {
method: "predicateOnTab",
format:"%K LIKE[c] '*play*.pocketcasts.com*'",
args: ["URL"]
},
toggle: function () {document.querySelector('.play_pause_button').click()},
next: function () {document.querySelector('.skip_forward_button').click()},
View gist:2f4b0225ded9129ff1334a15f75469cc
99% Invisible
Ada Lovelace Day Podcast
All About Android
Base.cs Podcast
Best of the Web: the MetaFilter Podcast
Bonfireside Chat
Code Switch
CodeNewbie
Cordkillers
Current Geek
View stuff.md
View figure.css
.figure {
border: 1px solid $grey-light-medium;
padding: 10px;
background: $white;
}
.figure-img {
padding-bottom: 5px;
border: none;
}
You can’t perform that action at this time.