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
| // See -> http://diveintohtml5.info/detect.html#techniques | |
| function detectInputTypeSupport(type){ | |
| var i = document.createElement("input"); | |
| i.setAttribute("type", type); | |
| return i.type === type; | |
| } |
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> | |
| <head> | |
| <title>Hammer.js dragdrop with css3 animation example</title> | |
| <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
| <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"> | |
| <style> | |
| h1 { | |
| margin: 30px; |
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
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| <p id='out'></p> | |
| <script type="text/javascript" charset="utf-8"> | |
| (function(global){ | |
| var analyser; |
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
| #ls | |
| find ~/Library/Application\ Support/iLifeAssetManagement/assets/sub -type f \( -name "*.JPG" -o -name "*.jpg" \) -print0 | xargs -0 -J% ls | |
| #copy | |
| find ~/Library/Application\ Support/iLifeAssetManagement/assets/sub -type f \( -name "*.JPG" -o -name "*.jpg" \) -print0 | xargs -0 -J% cp % ~/dist | |
| #move | |
| find ~/Library/Application\ Support/iLifeAssetManagement/assets/sub -type f \( -name "*.JPG" -o -name "*.jpg" \) -print0 | xargs -0 -J% mv % ~/dist |
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 callbacks = (function(){ | |
| var cbs = []; | |
| // copy from underscore.js | |
| var slice = Array.prototype.slice, | |
| isFunction = function(obj) { | |
| return typeof obj === 'function'; | |
| }, | |
| head = function(array, n, guard) { | |
| if (array == null) return void 0; | |
| return (n == null) || guard ? array[0] : slice.call(array, 0, n); |
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
| import java.io.ByteArrayInputStream | |
| import scala.collection.JavaConversions._ | |
| import scala.io.Source | |
| import scala.util.control.NonFatal | |
| import com.amazonaws.{AmazonClientException, AmazonServiceException} | |
| import com.amazonaws.{ClientConfiguration, Protocol} | |
| import com.amazonaws.auth.BasicAWSCredentials | |
| import com.amazonaws.services.s3.AmazonS3Client |
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> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>CSS diamond</title> | |
| <style type="text/css"> | |
| div.diamond { | |
| position: relative; |
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
| <snippet> | |
| <content><![CDATA[ | |
| ###* | |
| # [bind description] | |
| # @type {[type]} | |
| ### | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>###*#</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> |
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
| sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist | |
| #or | |
| sudo /Library/StartupItems/VirtualBox/VirtualBox restart |
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
| grunt.registerTask 'commitVersion', 'get current commit version', -> | |
| done = @.async() | |
| { exec } = require 'child_process' | |
| exec 'echo `git log | head -n 1 | cut -c 8-14`', (err, stdout, stderr)-> | |
| if (err) | |
| grunt.warn(err) | |
| return done() | |
| commitVersion = stdout.replace "\n", "" | |
| # do some stuff with commitVersion | |
| fs = require 'fs' |