Skip to content

Instantly share code, notes, and snippets.

Avatar

Web Apprentice webapprentice

View GitHub Profile
@webapprentice
webapprentice / tutorial_11_demo_1.html
Last active Dec 27, 2015
Embed a public Google Calendar in a web page
View tutorial_11_demo_1.html
<iframe src="https://www.google.com/calendar/embed?height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=craic.web.apprentice%40gmail.com&amp;color=%232952A3&amp;ctz=America%2FLos_Angeles" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>
@webapprentice
webapprentice / tutorial_12_example_1.html
Created Nov 7, 2013
Use the highcharts.js JavaScript library to display a graph in a page
View tutorial_12_example_1.html
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="width: 800px; height: 400px; margin: 0 auto; border: 1px solid black;"></div>
<script>
$(function () {
$('#container').highcharts({
title: {
text: 'Registered Syrian Refugees',
@webapprentice
webapprentice / tutorial_13_example_1.html
Last active Dec 27, 2015
Embed multi-page documents hosted on Scribd in a web page
View tutorial_13_example_1.html
<p style=" margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;">
<a title="View Apple Samsung Verdict on Scribd" href="http://www.scribd.com/doc/103850190/Apple-Samsung-Verdict" style="text-decoration: underline;" >Apple Samsung Verdict</a>
by
<a title="View Mashable's profile on Scribd" href="http://www.scribd.com/Mashable" style="text-decoration: underline;" >Mashable</a></p>
<iframe class="scribd_iframe_embed" src="//www.scribd.com/embeds/103850190/content?start_page=1&view_mode=scroll&access_key=key-15dmx1n9d44whpgh7s79&show_recommendations=false" data-auto-height="false" data-aspect-ratio="0.772727272727273" scrolling="no" id="doc_159" width="400" height="600" frameborder="0"></iframe>
@webapprentice
webapprentice / tutorial_14_example_1.html
Created Nov 7, 2013
Add Sharing buttons to your pages using AddThis
View tutorial_14_example_1.html
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_pinterest_share"></a>
<a class="addthis_button_google_plusone_share"></a>
<a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-527bc84e7d786e11"></script>
<!-- AddThis Button END -->
@webapprentice
webapprentice / tutorial_15_example_1.html
Last active Dec 27, 2015
Display a Google Map using the Maps JavaScript API
View tutorial_15_example_1.html
<style>
#map_canvas {
height: 400px;
width: 600px;
border: 1px solid black;
}
</style>
<div id="map_canvas"></div>
@webapprentice
webapprentice / tutorial_16_example_1.html
Created Nov 12, 2013
Translate your Site with the Google Website Translator
View tutorial_16_example_1.html
<meta name="google-translate-customization" content="64be6db56529e461-bedaae94d1d3034d-g1586aeda755216da-1d"></meta>
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
@webapprentice
webapprentice / tutorial_17_example_1.html
Last active Dec 28, 2015
Simple jQuery Slideshow with captions from Jon Raasch
View tutorial_17_example_1.html
<script type="text/javascript">
/***
Simple jQuery Slideshow Script
Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc. Please link out to me if you like it :)
Original blog post: http://jonraasch.com/blog/a-simple-jquery-slideshow
***/
var intervalId;
@webapprentice
webapprentice / tutorial_18_example_1.html
Created Nov 13, 2013
Example tracking code for Google Analytics
View tutorial_18_example_1.html
<script>
// Do not use this code in your web site - it won't work - included here for illustration
(function(i,s,o,g,r,a,m){
i['GoogleAnalyticsObject']=r;
i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)
},
i[r].l=1*new Date();
a=s.createElement(o),
m=s.getElementsByTagName(o)[0];
@webapprentice
webapprentice / tutorial_19_example_1.html
Last active Dec 28, 2015
Simple example of using geolocation in HTML5
View tutorial_19_example_1.html
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDPlbegz3bhu9AnJDCLWsOZM8jF3Hpp8tI&sensor=false"></script>
<script>
$(document).ready(function() {
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var str = 'Latitude: ' + position.coords.latitude.toString() + ' deg<br>' +
'Longitude: ' + position.coords.longitude.toString() + ' deg<br>';
@webapprentice
webapprentice / tutorial_20_example_1.html
Created Nov 14, 2013
Example of embedding a gist in a web page
View tutorial_20_example_1.html
<script src="https://gist.github.com/webapprentice/7359720.js"></script>
You can’t perform that action at this time.