Skip to content

Instantly share code, notes, and snippets.

View azz0r's full-sized avatar
🎯
Focusing

Aaron Wuggawoo azz0r

🎯
Focusing
View GitHub Profile
$screen-sm-min: 768px;
$screen-xs-max: ($screen-sm-min - 1);
$screen-md-min: 992px;
$screen-sm-max: ($screen-md-min - 1);
$screen-lg-min: 1200px;
$screen-md-max: ($screen-lg-min - 1);
body {
$screen-sm-min: 768px;
$screen-xs-max: ($screen-sm-min - 1);
$screen-md-min: 992px;
$screen-sm-max: ($screen-md-min - 1);
$screen-lg-min: 1200px;
$screen-md-max: ($screen-lg-min - 1);
@mixin breakpoint($class) {
// 1
var myApp = angular.module('myApp',[]);
myApp.service('dataService', function($http) {
delete $http.defaults.headers.common['X-Requested-With'];
this.getData = function() {
// $http() returns a $promise that we can add handlers with .then()
return $http({
method: 'GET',
url: 'https://www.example.com/api/v1/page',
// https://github.com/gtramontina/lambda/blob/master/lambda.js
// Arithmetics -----------------------------------------------------------------
IDENTITY = x => x
SUCCESSOR = n => f => x => f(n(f)(x))
PREDECESSOR = n => f => x => n(g => h => h(g(f)))(_ => x)(u => u)
ADDITION = m => n => n(SUCCESSOR)(m)
SUBTRACTION = m => n => n(PREDECESSOR)(m)
MULTIPLICATION = m => n => f => m(n(f))
@azz0r
azz0r / react-lifecycle.js
Created February 6, 2017 09:43
React.js Lifecycle Events
// Invoked once before first render
componentWillMount() {
console.log('componentWillMount');
// Calling setState here does not cause a re-render
}
// Invoked once after the first render
componentDidMount(){
console.log('componentDidMount');
}
@azz0r
azz0r / double-slash
Created June 24, 2017 21:51
Regex to remove // comments
(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*)
//src/services/parts/custom-elements-es5-adapter.js
(function() {
'use strict';
function initialise () {
'use strict';
if (!window.customElements) return;
var a = window.HTMLElement,
b = window.customElements.define,
c = window.customElements.get,
import React from 'react';
import { expect } from 'chai';
import shallow from 'react-test-renderer/shallow';
import sinon from 'sinon';
import Page from '../src/pages/dashboard/dashboard';
import HeaderOne from '../src/components/h1/h1';
import Ranking from '../src/components/ranking/ranking';
import Wrestlers from "./wrestlers.json"
case "STORE_MATCH_DATA":
{
let bouts = Object.assign([], action.payload.matches)
bouts = bouts.filter(item => !item.resultStored && item.simulated)
bouts.forEach(bout => {
const winningTeamId = bouts.wrestlers.find(item => item.winner)
const losingTeamId = bouts.wrestlers.find(item => item.loser)
if (winningTeamId && losingTeamId) {
import React, { Component } from 'react';
import styled, { ThemeProvider } from 'styled-components';
import { modularScale, hiDPI } from 'polished';
import Grid from 'styled-components-grid';
import defaultState from './context';
const extraWrestler = {
id: 3,
name: 'Shawn Michaels'