Skip to content

Instantly share code, notes, and snippets.

@12
12 / input.scss
Last active October 5, 2021 11:01
Grid
@use "sass:math";
@use "sass:map";
// COLOURS
$purple: #6935D3;
$teal: #68D9CF;
$neutral-teal: #E7F9F7;
$dark-navy: #192851;
$neutral-navy: #E6E9F2;
$pale-blue: #F0F1F6;

Keybase proof

I hereby claim:

  • I am 12 on github.
  • I am rhell (https://keybase.io/rhell) on keybase.
  • I have a public key ASDqomTtk3b30N4l9woV5AyeTJJEeTEnjHH4aRyAe58LBQo

To claim this, I am signing this object:

@12
12 / FizzBuzz.js
Created May 21, 2020 10:59
FizzBuzz
for (var i = 0; i < 100; i++){
var msg = "";
if (!(i%3)) msg += "Fizz";
if (!(i%5)) msg += "Buzz";
console.log(msg || i);
}
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: Superf Performance Runner
Resources:
PerformanceRunnerFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri: runner/
Handler: app.handler
Runtime: nodejs12.x
FROM node:12.16.1
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
@12
12 / jest.config.js
Last active February 13, 2020 15:24
module.exports = {
projects: [
{
displayName: 'client',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['./jest.setup.js'],
testMatch: ['**/client/**/*.test.js?(x)'],
},
{
displayName: 'node',
@12
12 / o.js
Last active September 23, 2019 11:33
Big O Notation
/*
Big O notation describes the complexity of an algorithm by denoting how long it
will take to run in the worst-case scenario. It gives an asymptotic upper bound.
O(1)
Algorithm will always take same time to execute regardless of input
*/
function isNumberOne(number) {
return number === 1;
@12
12 / thing.js
Last active August 8, 2019 13:06
Destructuring
const myObject = {
foo: 'hello',
bar: 'world',
baz: 'this',
};
const { foo, bar, baz } = myObject;
console.log(foo); // 'hello'
console.log(bar); // 'world'
@12
12 / articleBodySpec.js
Created August 6, 2019 10:45
Conditional Cypress
if (service === 'news') {
it('should have a visible image with a caption that is lazyloaded and has a noscript fallback image', () => {
cy.get('figure')
.eq(2)
.within(() => {
cy.get('div div div div').should(
'have.class',
'lazyload-placeholder',
);
})
lines.map(({
name,
modified,
lineStatuses: [
{
statusSeverity,
statusSeverityDescription,
reason
}
]