Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Bruno Casali brunoocasali

🏠
Working from home
Block or report user

Report or block brunoocasali

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View app-components-data-loader.js
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { restartableTask } from 'ember-concurrency-decorators';
import { inject as service } from '@ember/service';
import query from 'uaw/gql/queries/allOpinionsSearch';
export default class DataLoaderComponent extends Component {
@service apollo;
@service filters;
@tracked results = [];
View controllers.application.js
import Ember from 'ember';
import {inject as service} from '@ember/service';
export default Ember.Controller.extend({
appName: `Ember's Route Hook Order`,
router: service(),
actions: {
clearLog() {
Ember.$('.log-item').remove();
View components.list-item.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
histogram: [{1: 4}, {2: 10}, {3: 2425}, {4: 2}, {5: 294}]
});
@brunoocasali
brunoocasali / logeverything.js
Created Nov 21, 2018 — forked from zapthedingbat/logeverything.js
Log every function call to the console
View logeverything.js
(function() {
var call = Function.prototype.call;
Function.prototype.call = function() {
console.log(this, arguments);
return call.apply(this, arguments);
};
}());
View grub-update.sh
sudo su
mkdir /mnt/dir
mount /dev/sda6 /mnt/dir
for dir in proc dev sys etc bin sbin var usr lib lib64 tmp; do
mount -o bind $dir /mnt/dir/$dir
done
chroot /mnt/dir
# nano /etc/default/grub
# update-grub2
@brunoocasali
brunoocasali / exercises.md
Last active Jun 21, 2018
UNISEP exercícios LEGO EV3
View exercises.md

Exercício 1

O robô deverá andar para frente até que este encontre um obstáculo e, então, deverá andar alguns centímetros de ré, e então virar, para o lado direito ou esquerdo e continuar andando para frente.

OBS: Deverá obrigatoriamente usar o bloco matemático (random).

Exercício 2

O robô deverá andar sempre para frente e evitar a colisão (50 cm). Ao notar a presença de alguma parede ou objeto, este deve parar completamente e para escolher o próximo destino ele irá girar em 360º (para a direita ou esquerda) procurando uma direção onde o sensor indique um obstáculo a mais de 50cm (ou a ausência deles) e então é para este caminho que ele irá seguir. Caso não haja caminho disponível ele deverá emitir uma mensagem e se auto-desligar.

View hive-site.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
View script-base.pig
-- NOTES:
-- double dash denotes comments
-- $ denotes shell command
-- everything else is Pig Latin, executed in Grunt
-- Data set downloaded from http://www.ncdc.noaa.gov
-- Load data into Hadoop
$ hadoop fs -put ./input.txt input.txt
$ hadoop fs -ls
$ hadoop fs -tail hdfs://localhost.localdomain:8020/user/cloudera/input.txt
You can’t perform that action at this time.