Skip to content

Instantly share code, notes, and snippets.

View interaminense's full-sized avatar
🖐️
Hi there!

Adriano Interaminense interaminense

🖐️
Hi there!
View GitHub Profile
@interaminense
interaminense / 3rd-party-assets.html
Last active April 25, 2024 18:21
Demo by using 3rd party assets
<div
data-analytics-asset-id="myBlogId"
data-analytics-asset-title="Blog Title"
data-analytics-asset-type="blog"
>
<h3>Bringing Ideas To Life: A Look Into Creative Writing</h3>
<p>
This blog explores the ways in which we can use creativity to bring our
ideas to life. We will be looking at techniques for how to inspire, generate
@interaminense
interaminense / utils.js
Last active July 7, 2021 20:37
Utils for JS
/**
* Util Create DOM using literal templates
*/
const createElement = tmpl => new DOMParser().parseFromString(tmpl, 'text/html').body.firstChild;
/**
* Util Object Builder
*/
const builder = (newList = []) => {
let list = newList;
@interaminense
interaminense / get-file-content.graphql
Last active November 3, 2018 00:43
Github API Graphql - Get file content
query {
repository(name: "repo-name", owner: "owner") {
object(expression: "branch:file/to/path.extension") {
... on Blob {
text
}
}
}
}
@interaminense
interaminense / mathematics-color-lvls.scss
Last active February 28, 2018 04:49
Mathematics Color LVLS
$color-belize-hole: #2980b9;
$color-amethyst: #9b59b6;
$color-wet-asphalt: #34495e;
$color-sun-flower: #f1c40f;
$lvls: (
('easy', $color-sun-flower),
('normal', $color-amethyst),
('hard', $color-belize-hole),
('very-hard', $color-wet-asphalt)
@interaminense
interaminense / mathematics-utils.js
Created February 28, 2018 04:37
Mathematics Utils
/**
* Object list language
*/
const LANGUAGE = {
errors: 'errors',
hits: 'hits',
next: 'next',
ops: '🤦 Ops, try again!',
totalErrors: 'total erros',
totalHits: 'total hits',
@interaminense
interaminense / mathematics-setstartgame.js
Created February 28, 2018 04:32
Mathematics SetStartGame
setStartGame() {
this.setNextOperation();
this.setState({
errors: 0,
finish: false,
hits: 0,
init: false,
message: '',
start: true
@interaminense
interaminense / mathematics-lifecycle-created.js
Created February 28, 2018 04:31
Mathematics Lifecycle Created
created() {
this.state.countdown = this.props.countdown;
this.setLvl(this.props.lvlDefault);
this.setInitGame();
}
@interaminense
interaminense / mathematics-component-empty.js
Created February 28, 2018 04:30
Mathematics Component Empty
import '../style/mathematics.scss';
import {Button, Layout, Operation} from './';
import {LANGUAGE, CALCULATE, getRandomNumber} from '../utils/Utils';
import {EventHandler} from 'metal-events';
import Component, {Config} from 'metal-jsx';
import dom from 'metal-dom';
import position from 'metal-position';
class Mathematics extends Component {};
@interaminense
interaminense / mathematics-props-children.js
Created February 28, 2018 04:28
Mathematics Props Children
<Button style={'primary'}>
<span class='icon icon-arrow-down' /> show more
</Button>
@interaminense
interaminense / mathematics-event-click.js
Created February 28, 2018 04:26
Mathematics Event Click
<Button style={'primary'} onClick='handleOnClick' />