Skip to content

Instantly share code, notes, and snippets.

View matheo's full-sized avatar
🔥
Driven by Passion

Mateo Tibaquirá matheo

🔥
Driven by Passion
View GitHub Profile
@matheo
matheo / astronomy.d.ts
Created February 7, 2021 05:24
Potential astronomy-engine typings
/**
@preserve
Astronomy library for JavaScript (browser and Node.js).
https://github.com/cosinekitty/astronomy
MIT License
Copyright (c) 2019-2021 Don Cross <[email protected]>
@matheo
matheo / SearchComponent.ts
Last active May 8, 2019 15:17
Search DataSource Example
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl } from '@angular/forms';
import { SearchDatasource } from '@myproject/model';
@Component({
selector: 'ui-layout-search',
templateUrl: './search.component.html',
styleUrls: ['./search.component.scss'],
encapsulation: ViewEncapsulation.None,
providers: [SearchDatasource]
@matheo
matheo / app.initializer.ts
Created February 15, 2019 05:11
Angular APP_INITIALIZER with NgRx Effects
/**
* App Initializer with Effects
*/
export function initApplication(store: Store<AppState>) {
return () =>
new Promise(resolve => {
const loaded$ = new Subject();
store.dispatch(new LoadSystem());
store
@matheo
matheo / nx.json.diff
Last active January 15, 2019 19:32
Nx Monorepo Article
{
+ "npmScope": "myproject",
"implicitDependencies": {
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header,.site-footer,.repository-sidebar,.file-navigation,.gh-header-meta,.gh-header-actions,#wiki-rightbar,#wiki-footer,.commit-tease').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D); var removeMe = document.getElementsByClassName("file-header")[0]; removeMe.parentNode.removeChild(r
@matheo
matheo / docker-locale.sh
Last active November 15, 2016 19:06
Bash Scripts
ENV LANG=en_GB.UTF-8
RUN apt-get install -y locales && \
sed -i -e "s/# $LANG.*/$LANG.UTF-8 UTF-8/" /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=$LANG
@matheo
matheo / install-odoo-saas.sh
Created November 10, 2016 06:28 — forked from bassn/install-odoo-saas.sh
install odoo from source
#!/bin/bash
################################################################################################
# Fully automated script to install Odoo and Odoo SaaS Tool (tested on a fresh Ubuntu 14.04 LTS)
# * Install & configure last stable version of nginx
# * Install & configure last stable version of postgresql
# * Install & configure Odoo
# * Configure automated backup of Odoo databases
# * Optional: Install & configure Odoo SaaS Tool
# * Optional: Background installation: $ nohup ./odoo_install.sh > nohup.log 2>&1 </dev/null &
################################################################################################
@matheo
matheo / 030_update_platform_config.js
Created June 24, 2016 20:55 — forked from marcocarnazzo/030_update_platform_config.js
Ionic/Cordova update platform config
#!/usr/bin/env node
/** This hook updates platform configuration files based on preferences and config-file data defined in config.xml.
Currently only the AndroidManifest.xml and IOS *-Info.plist file are supported.
See http://stackoverflow.com/questions/28198983/ionic-cordova-add-intent-filter-using-config-xml
Preferences:
1. Preferences defined outside of the platform element will apply to all platforms
2. Preferences defined inside a platform element will apply only to the specified platform
@matheo
matheo / adb.log
Created June 10, 2016 16:02
gms log
06-10 10:58:46.053 2832 3194 W ctxmgr : [AclManager]checkPermissionTypeStatus: no inject permission for { uid=10013, packageName=com.google.android.gms }. Returned permission was: PACKAGE_NOT_WHITELISTED for context name=POWER_CONNECTION, account=account#-517948760#
06-10 10:58:46.053 2832 3194 W ctxmgr : [AclManager]checkPermissionTypeStatus: no inject permission for { uid=10013, packageName=com.google.android.gms }. Returned permission was: PACKAGE_NOT_WHITELISTED for context name=POWER_CONNECTION, account=account#-517948760#
06-10 10:58:46.053 2832 2832 E ctxmgr : [PowerConnectionProducer]Could not write powerInfo=Plug state: 2 BatteryLevel: 0.99, status=Status{statusCode=unknown status code: 7503, resolution=null}
06-10 10:58:47.379 29839 29839 I chromium: [INFO:CONSOLE(26357)] "Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.", source: file:///android_asset/www/build/js/app.bundle.js (26357)
06-10 10:58:47.392 29839 29839 I chromium: [INFO:CONSOL
@matheo
matheo / adb.log
Created June 10, 2016 15:31
cordova.plugin.googlesignin
06-10 10:28:18.746 6746 6965 I GooglePlugin: Building Google options
06-10 10:28:18.786 6746 6965 I GooglePlugin: Building GoogleApiClient
06-10 10:28:18.849 6746 6965 I GooglePlugin: GoogleApiClient built
06-10 10:28:18.849 6746 6965 I GooglePlugin: Determining command to execute
06-10 10:28:18.849 6746 6965 I GooglePlugin: Trying to Log in!
06-10 10:28:18.849 6746 6965 D ConnectPlugin: activity result in plugin: requestCode(0), resultCode(0)
06-10 10:28:18.868 834 2168 I ActivityManager: START u0 {act=com.google.android.gms.auth.GOOGLE_SIGN_IN cmp=co.com.apppackage/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (has extras)} from uid 10092 on display 0
06-10 10:28:18.901 6746 6965 W PluginManager: THREAD WARNING: exec() call to GooglePlus.login blocked the main thread for 170ms. Plugin should use CordovaInterface.getThreadPool().
06-10 10:28:18.979 834 2679 I ActivityManager: Killing 5424:com.android.chrome/u0a82 (adj 15): empty #17
06-10 10:28:19.033 834 2679 I Act