table.container>tr>td>table.row>tr>td.wrapper>table.six.columns>tr>td.text-pad^^^td.wrapper.last>table.six.columns>tr>td.text-pad
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var $injector = angular.injector(['ng']); | |
| var $q = $injector.get('$q'); | |
| function promise(msg) { | |
| var defer = new $q.defer(); | |
| defer.promise.then(function() { | |
| console.log(msg + "I promised!"); | |
| }).then(function() { | |
| console.log(msg + "I would do this too") | |
| }).then(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| rm -fr *.ova | |
| # extract the sfx files into the respsective zip files | |
| for SFX in *.sfx | |
| do | |
| echo "Extracting SFX: $SFX"; | |
| ./$SFX |
This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.
Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.
See a demo at http://stuff.dan.cx/js/filepicker/google/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'sinatra' | |
| require 'premailer' | |
| require 'json' | |
| configure :production do | |
| set :port, 80 | |
| end | |
| get '/premailer' do | |
| <<-eos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*global angular: true, google: true, _ : true */ | |
| 'use strict'; | |
| angular.module('geocoder', ['ngStorage']).factory('Geocoder', function ($localStorage, $q, $timeout) { | |
| var locations = $localStorage.locations ? JSON.parse($localStorage.locations) : {}; | |
| var queue = []; | |
| // Amount of time (in milliseconds) to pause between each trip to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| var scriptName = "embed.js"; //name of this script, used to get reference to own tag | |
| var jQuery; //noconflict reference to jquery | |
| var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"; | |
| var jqueryVersion = "1.8.3"; | |
| var scriptTag; //reference to the html script tag | |
| /******** Get reference to self (scriptTag) *********/ | |
| var allScripts = document.getElementsByTagName('script'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| var CSSCriticalPath = function(w, d, opts) { | |
| var opt = opts || {}; | |
| var css = {}; | |
| var pushCSS = function(r) { | |
| if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
| var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
| for(var i = 0; i < styles.length; i++) { | |
| if(!!styles[i] === false) continue; | |
| var pair = styles[i].split(": "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app="myApp"> | |
| <head> | |
| <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <h1>Angular CORS configuration</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Element.prototype.prependChild = function(newElement) { | |
| return this.insertBefore(newElement, this.firstChild); | |
| }; |