Skip to content

Instantly share code, notes, and snippets.

@esironal
esironal / dug.js
Created September 28, 2015 14:05
Lightweight, simple, library-independent script to pull in feeds of content available on the web as JSONP to display on your site
/*
@name Dug.js — A JSONP to HTML Script
@author Rogie King <[email protected]>
@version 1.0
@license WTFPL — http://en.wikipedia.org/wiki/WTFPL
@donate My paypal email is [email protected] if you want to buy me a brew.
*/
@esironal
esironal / index.html
Created September 20, 2015 23:16
Zurb Off-Canvas Menu (CDN)
<!DOCTYPE html>
<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
<html class="no-js" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Foundation 5</title>
@esironal
esironal / github.jquery.js
Last active May 25, 2019 10:39 — forked from lsloan/ List GitHub Projects Using jQuery
list-github-projects-using-javascript
// http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html
jQuery.githubUserRepositories = function(username, callback) {
jQuery.getJSON("https://api.github.com/users/" + username + "/repos?callback=?", callback);
}
jQuery.fn.loadRepositores = function(username) {
this.html("<span>Querying GitHub for repositories...</span>");
var target = this;
@esironal
esironal / gist:caced2b2e77a918437c1
Last active February 18, 2016 12:10 — forked from derek/gist:674668
Snagging Github repos with YQL
// Create a JSONP wrapper
function executeYQL(yql, callbackFuncName) {
var url = "http://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(yql) + "&env=store://datatables.org/alltableswithkeys&format=json&callback="+callbackFuncName;
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
head.appendChild(script);
}
// http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html
jQuery.githubUser = function(username, callback) {
jQuery.getJSON("http://github.com/api/v1/json/" + username + "?callback=?", callback);
}
jQuery.fn.loadRepositores = function(username) {
this.html("<span>Querying GitHub for repositories...</span>");
var target = this;
@esironal
esironal / listgists.js
Created September 2, 2015 18:10
List Public Gists
var $List = $('#list'),
sUser ='potherca',
sUrl = 'https://api.github.com/users/' + sUser + '/gists'
;
$.ajax({
dataType: "json",
url: sUrl,
success: function(p_oData){
$.each(p_oData, function(p_iIndex, p_oRepo){
@esironal
esironal / htmlpreview.js
Created August 27, 2015 19:06
Github Gist and Bitbucket HTML preview JS
var HTMLPreview = {
content: '',
previewform: document.getElementById('previewform'),
file: function() {
return location.search.substring(1); //Get everything after the ?
},
@esironal
esironal / jsonJquery.html
Created August 27, 2015 02:14
Json Jquery
<!doctype html>
<html>
<head>
<title>How to Parse a JSON file using jQuery</title>
<style>
body{
text-align: center;
font-family: arial;
@esironal
esironal / codemirror.html
Created August 27, 2015 01:31
Code mirror
<script src="//cdn.jsdelivr.net/g/[email protected](addon/comment/comment.js+addon/display/fullscreen.js+addon/display/placeholder.js+addon/edit/closebrackets.js+addon/edit/closetag.js+addon/edit/continuelist.js+addon/edit/matchbrackets.js+addon/edit/matchtags.js+addon/edit/trailingspace.js+addon/fold/foldgutter.js+addon/hint/anyword-hint.js+addon/hint/css-hint.js+addon/hint/html-hint.js+addon/hint/javascript-hint.js+addon/hint/show-hint.js+addon/hint/sql-hint.js+addon/hint/xml-hint.js+addon/lint/css-lint.js+addon/lint/javascript-lint.js+addon/lint/json-lint.js+addon/lint/lint.js+addon/lint/yaml-lint.js+addon/merge/merge.js+addon/mode/loadmode.js+addon/mode/multiplex.js+addon/mode/overlay.js+addon/runmode/colorize.js+addon/runmode/runmode-standalone.js+addon/runmode/runmode.js+addon/scroll/scrollpastend.js+addon/search/match-highlighter.js+addon/search/search.js+addon/search/searchcursor.js+addon/selection/active-line.js+addon/selection/mark-selection.js+addon/tern/tern.js+codemirror.js+codemirror.min.js+keyma
@esironal
esironal / JsDeliverAPItest.html
Created August 26, 2015 22:36
JsDeliver API Test
<!doctype html>
<html><head>
<title>How to Parse a JSON file using jQuery</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<style>
body { text-align: center; font-family: arial; }
.button { margin:20px; font-size:16px; font-weight: bold; padding:5px 10px; }
</style>
</head><body>
<a href="//api.jsdelivr.com/v1/jsdelivr/libraries/lodash?fields=lastversion,name" target="_blank">Open JSON file</a><br />