Skip to content

Instantly share code, notes, and snippets.

View KidA78's full-sized avatar

Paul Kist KidA78

  • OneMedical
  • California
View GitHub Profile
@KidA78
KidA78 / gist:fb7cde34a9481f7ab22d9998e6a450cf
Last active March 3, 2021 11:35
Vue.js Component Inheritance Example
<!-- Markup -->
<!-- Components get injected here dynamically -->
<component
v-for="w in dashboardWidgets"
:is="w.type">
</component>
<!-- Base Widget Template -->
<script type="text/x-template" id="template-base">
<div class="grid-item widget {{widgetName}}">
@KidA78
KidA78 / gist:5279210
Created March 31, 2013 02:19
Some code to help engineers mock Twitter4J using EasyMock
import java.util.ArrayList;
import java.util.List;
import org.easymock.EasyMock;
import org.easymock.IExpectationSetters;
import org.json.JSONArray;
import org.json.JSONObject;
import twitter4j.Paging;
import twitter4j.RateLimitStatus;
/**
* Recursive method that returns a Future of URLs
*
* @param url
* @param maxDepth
* @param currentDepth
* @return
*/
public Future<List<String>> crawl(final String url, final int maxDepth, final int currentDepth) {