Skip to content

Instantly share code, notes, and snippets.

@RemeJuan
RemeJuan / main.js
Last active November 15, 2016 06:06
Aurelia: First Impressions #2
// Binding data
import { bindable } from 'aurelia-framework';
import { moment } from 'moment';
export class OtherComponent{
//Binding data reference
@bindable data;
//Change handler (not required).
dataChanged(data) {
<template>
<div>
<header-bar></header-bar>
<main>
<search-bar :submit="search" :term="searchTerm"></search-bar>
<list-data v-for="item in list" :event="item"></list-item>
</main>
<footer-bar></footer-bar>
</div>
</template>
<template>
<form novalidate @submit.stop.prevent="submit">
<label>Search term...</label>
<input v-model="term.value"></input>
</form>
</template>
<script>
export default {
name: 'Search',
@RemeJuan
RemeJuan / db.lookup.js
Created May 18, 2017 05:19
Mongo find all duplicated by 'name'
db.getCollection('events').aggregate([
{$group:{"_id":"$name","name":{$first:"$name"},"count":{$sum:1}}},
{$match:{"count":{$gt:1}}},
{$project:{"name":1,"_id":0}},
{$group:{"_id":null,"duplicateNames":{$push:"$name"}}},
{$project:{"_id":0,"duplicateNames":1}}
])
@RemeJuan
RemeJuan / webpack.prod.js
Last active July 14, 2017 17:21
PWA: Webpack
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
const WebpackPwaManifest = require('webpack-pwa-manifest');
const PUBLIC_PATH = 'https://www.remelehane.me/';
module: {
// Snip
plugins: [
// Snip
new SWPrecacheWebpackPlugin(
@RemeJuan
RemeJuan / cloudSettings
Last active December 15, 2020 03:11
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-15T03:11:23.399Z","extensionVersion":"v3.4.3"}
@RemeJuan
RemeJuan / action.js
Created May 21, 2018 13:30
Race Conditions Redux
export const SEARCH_POST_START = 'SEARCH_POST_START';
export const searchPostNoResults = data => ({
type: SEARCH_POST_NO_RESULTS, data,
});
@RemeJuan
RemeJuan / blocks.txt
Created November 3, 2018 15:09
PiHole List
0.0.0.0 mmofreegames.online
@RemeJuan
RemeJuan / api.dart
Created July 6, 2019 17:37
flutter_api_httpclient
import 'dart:io';
import 'dart:convert';
import 'package:cookie_jar/cookie_jar.dart';
var cj = new CookieJar();
class Session {
static HttpClient client = new HttpClient()
@RemeJuan
RemeJuan / azure.yaml
Last active April 27, 2020 03:20
Flutter pipeline config
pool:
name: Azure Pipelines
demands: xcode
steps:
- script: 'brew install fastlane'
displayName: 'Install fastlane'
- script: |
gem install bundler