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
| ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}" | |
| # Customized git status | |
| git_custom_status() { | |
| local cb=$(git_current_branch) | |
| if [ -n "$cb" ]; then | |
| echo "$(parse_git_dirty)[$cb]" | |
| fi | |
| } |
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> | |
| <script src="https://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js"></script> | |
| <meta charset="utf-8"> | |
| <title>Front End Onboarding</title> | |
| <script type="text/javascript"> | |
| document.observe("dom:loaded", function() { | |
| nxj.frontend.init(); | |
| }); |
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
| playlistModule.addTrack('a'); | |
| playlistModule.addTrack('b'); | |
| playlistModule.addTrack('c'); | |
| playlistModule.addTrack('d'); | |
| playlistModule.getTracks() | |
| ["a", "b", "c", "d"] | |
| playlistModule.shuffleTracks() | |
| ["d", "c", "a", "b"] |
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 playlistModule = (function() { | |
| /* private var */ | |
| var tracksArray = [], | |
| shuffleArray = []; | |
| /* public methods */ | |
| var addTrack = function(uri) { | |
| tracksArray.push(uri); | |
| return tracksArray; |
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
| /* click and drag */ | |
| new Draggable('tape_measure_drag', { constraint: 'horizontal', handle: 'tape_measure_drag', | |
| onDrag: function(e) { | |
| var offset = $('tape_measure_drag').positionedOffset().left; | |
| var value = ((offset-140)/80)*-1; | |
| value = (Math.round(value * 4) / 4).toFixed(2); | |
| if(value > 0) { | |
| $('measurementInput').value = value; | |
| } |
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
| /* container div for tape measure background */ | |
| .tape_measure_back { | |
| background: url("//imga.nxjimg.com/emp_image/apparel/measurements/tapemeasure/background.jpeg") no-repeat scroll 0 0 rgba(0, 0, 0, 0); | |
| height: 60px; | |
| margin: 10px auto 0; | |
| overflow: hidden; | |
| position: absolute; | |
| width: 320px; | |
| } |
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
| #measurementsContainer | |
| .measurements_sub_title Virtual Tailor | |
| #tape_measure.tape_measure_back | |
| #tape_measure_drag.tape_measure_inches | |
| %ul.numbers | |
| - (0...81).each do |i| | |
| %li | |
| %label= i | |
| %img.tapemeasure_needle{:src => "//imga.nxjimg.com/emp_image/apparel/measurements/tapemeasure/pointer.gif"} | |
| %input.nxj_input{:placeholder => "15", :id => "measurementInput"} |
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
| load 'vpim-13.11.11/lib/vpim/vcard.rb' | |
| #read file as string | |
| address_book = File.open('contacts.vcf') | |
| contents = address_book.read | |
| #load contacts | |
| original = Vpim::Vcard.decode(contents) | |
| #create new file |
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 snapshot() { | |
| if (localMediaStream) { | |
| var img = document.querySelector('img'); | |
| /* draws the image to the canvas */ | |
| ctx.drawImage(video, 0, 0); | |
| /* loads the img to the hidden img tag */ | |
| img.src = canvas.toDataURL('image/webp'); | |
| img.style.display= "block"; | |
| } | |
| } |
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
| window.onload = function() { | |
| var video = document.querySelector('video'); | |
| var canvas = document.querySelector('canvas'); | |
| var ctx = canvas.getContext('2d'); | |
| var localMediaStream = null; | |
| window.URL = window.URL || window.webkitURL; | |
| navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || | |
| navigator.mozGetUserMedia || navigator.msGetUserMedia; |
NewerOlder