This file contains 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 h2dec(hour,min) { | |
hour = parseInt(hour, 10) || 0 | |
minutes = parseInt(min, 10) || 0 | |
var minuteDecimalToHour = parseInt((min/6)*10, 10) | |
return parseFloat([hour,minuteDecimalToHour].join('.')) | |
} |
This file contains 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
license: gpl-3.0 |
This file contains 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
requirements_file = 'base.pip' | |
requirements = open(requirements_file, 'r') | |
content = requirements.read().splitlines() | |
content = list(set(content)) | |
content.sort(key=lambda y: y.lower()) | |
content = '\n'.join(content) | |
file = open('sorted_'+requirements_file, 'w') | |
file.write(content) |
This file contains 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
requirements_file = 'base.pip' | |
requirements = open(requirements_file, 'r') | |
content = requirements.read().splitlines() | |
content = list(set(content)) | |
content.sort(key=lambda y: y.lower()) | |
content = '\n'.join(content) | |
file = open('sorted_'+requirements_file, 'w') | |
file.write(content) |
This file contains 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> | |
</head> | |
<body> | |
<img style="display:none" src="image.png" alt=""> | |
<canvas id="canvas" onClick="selectPixel(this,event)"></canvas> | |
<script> | |
window.onload = function() { | |
var myImg = document.querySelector("img"); |
This file contains 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
brew uninstall macvim | |
brew uninstall vim | |
brew install macvim --with-cscope --with-lua --HEAD | |
brew install luajit | |
brew install vim --with-luajit |
This file contains 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 move(array, oldIndex, newIndex) { | |
if (newIndex >= array.length) { | |
newIndex = array.length - 1; | |
} | |
array.splice(newIndex, 0, array.splice(oldIndex, 1)[0]); | |
return array; | |
} | |
describe('ArrayHelper', function() { | |
it('Move right', function() { |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am woss on github. | |
* I am woss (https://keybase.io/woss) on keybase. | |
* I have a public key ASCIOvreMXBvtKpXx4febUjidog6icRKTyBgQJTTGRQ8IQo | |
To claim this, I am signing this object: |
This file contains 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
FROM ubuntu:14.04.3 | |
# Replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# make sure apt is up to date | |
RUN apt-get update --fix-missing | |
RUN apt-get install -y curl | |
RUN sudo apt-get install -y build-essential libssl-dev |
This file contains 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
/** | |
* An AngularJS directive for Dropzone.js, http://www.dropzonejs.com/ | |
* | |
* Usage: | |
* | |
* <div ng-app="app" ng-controller="SomeCtrl"> | |
* <button dropzone="dropzoneConfig"> | |
* Drag and drop files here or click to upload | |
* </button> | |
* </div> |