Skip to content

Instantly share code, notes, and snippets.

View heat's full-sized avatar
🌚
Working from home

Onezino Moreira heat

🌚
Working from home
View GitHub Profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
googlebot
bingbot
yandex
baiduspider
twitterbot
facebookexternalhit
rogerbot
linkedinbot
embedly
quora link preview
@heat
heat / rxjs-test.js
Created March 22, 2019 21:40
rxjs operations / subject
const expect = require('chai').expect;
const EventEmitter = require('events');
const rxjs = require('rxjs');
const { ajax } = require('rxjs/ajax');
const { debounce, debounceTime, distinctUntilChanged, switchMap, tap } = require('rxjs/operators');
describe('A emitter', function () {
it('should emit something', async function (done) {
//Hit compile and run to see a sample output.
//Read values from stdin, do NOT hard code input.
// process.stdin.resume();
process.stdin.setEncoding("ascii");
var input = "";
//only to read all chunk data
process.stdin.on("data", function (chunk) {
@heat
heat / nsq-docker-compose.yml
Created August 18, 2018 00:26
nsq compose file
version: '3'
services:
lookup:
container_name: lookup
image: nsqio/nsq
command: /nsqlookupd
ports:
- "4160:4160"
- "4161:4161"
worker:
func benchmarkFib(i int, b *testing.B) {
for n := 0; n < b.N; n++ {
Fib(i)
}
}
func BenchmarkFib1(b *testing.B) { benchmarkFib(1, b) }
func BenchmarkFib2(b *testing.B) { benchmarkFib(2, b) }
func BenchmarkFib3(b *testing.B) { benchmarkFib(3, b) }
func BenchmarkFib10(b *testing.B) { benchmarkFib(10, b) }
@heat
heat / dropdown-materializecss
Created June 3, 2018 13:48
exemplo de materialize css
{{#dropdown/negociacao-filtro content="filtro" constrainWidth=600 alignment="right" belowOrigin=true }}
{{/dropdown/negociacao-filtro}}
<!-- Dropdown Trigger -->
<!-- Dropdown Structure -->
<div id="filtro" class="dropdown-content filtro">
<div class="row">
<div class="col m4 input-field">
{{input value=value type="text"}}
<label for="last_name" class="active">Filtro 1</label>
@heat
heat / parametros.diff
Created May 31, 2018 20:09
como carregar parametros
@@ -1,4 +1,12 @@
Discard Hunk
Stage Hunk
import Ember from 'ember';
export default Ember.Route.extend({
afterModel() {
return this.get('store').query('b/parametro', { orderBy: 'ssupervisor', equalTo: true})
@heat
heat / component.hbs
Created May 31, 2018 16:10
component bs-switch
{{yield}}
-log
[OK] Operating on 64-bit architecture
-------- Log file Recommendations ------------------------------------------------------------------
[--] Log file: /var/lib/mysql/mariadbeus05.err(0B)
[!!] Log file /var/lib/mysql/mariadbeus05.err doesn't exist
[!!] Log file /var/lib/mysql/mariadbeus05.err isn't readable.
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE