Skip to content

Instantly share code, notes, and snippets.

@robbiemu
robbiemu / res_service.js
Created August 25, 2016 12:23
angular dynamic resource manager
angular.module('app').service('Res', ['$rootScope', function ($rootScope) {
var scope = $rootScope
scope._scripts = scope._scripts || []
scope._styles = scope._styles || []
scope._rawScripts = scope._rawScripts || []
scope._rawStyles = scope._rawStyles || []
return {
style: function (inp) {
var hrefs = []
Service = (function() {
return {
body: function(){
var s = {}
const controller_wrapper = function (f) {
return function () {
s = Array.prototype.shift.apply(arguments)
let r = f.apply(this, arguments)
return {
$scope: s,
@robbiemu
robbiemu / generator.js
Created May 12, 2016 14:57
es6 generators
require('console');
/**
* Created by rober_000 on 5/12/2016.
*/
class Factorials{
recursive(n){
if (n === 1) {
return 1;
}
return n * this.recursive(n - 1);
import java.util.*;
import java.lang.*;
/**
* Created by RobertoTomás on 0027, 27, 4, 2016.
*/
public class StringSorter {
public static void main(String[] args) {
//Arrays.stream(args).sorted(Comparator.naturalOrder());
package xyz.selfenrichment.robertotomas.popularmovies.lib;
// Created by RobertoTomás on 0004, 4, 4, 2016.
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListAdapter;
// ==UserScript==
// @name Feedly Tweaks
// @namespace http://your.homepage/
// @version 1.0
// @description tweaks for feedly
// @author You
// @include /https?:\/\/feedly.com/
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @grant none
// ==/UserScript==
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Solution
{
class Solution
{
static void Main(String[] args)
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package xyz.selfenrichment.robertotomas.popularmovies.SQLite;
// Created by RobertoTomás on 0002, 2, 4, 2016.
import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteConstraintException;
@Override
public void onResume() {
super.onResume();
PreferenceManager.getDefaultSharedPreferences(getContext())
.registerOnSharedPreferenceChangeListener(this);
}
@Override public void onPause() {
super.onPause();