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
fs = require('fs'); | |
http.createServer(function(request, response) { | |
var newFile = fs.createWriteStream('readme_copy.md'); | |
var fileBytes = request.headers['content-length']; | |
var uploadedBytes = 0; | |
request.pipe(newFile); | |
request.on('data', function(chunk) { |
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
$scope.onError = function(err) { | |
console.log('Error: '+err); | |
}; | |
$scope.onData = function(id, data) { | |
console.log(data+' from '+id); | |
var a = new Uint8Array(data); | |
}; | |
var Peripheral = function (deviceId) { |
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
$colour: #3097b4 | |
a { | |
color: $colour; | |
text-decoration: underline; | |
&:hover { | |
color: saturate(lighten($colour, 15%), 20%); | |
} | |
&:active { | |
color: desaturate(darken($colour, 15%), 25%); |
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
/** | |
* @author Richard Osterloh <richard.osterloh.com> | |
* @version 1 | |
* @since ${DATE}. | |
*/ |
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
var compareTo = function() { | |
return { | |
require: "ngModel", | |
scope: { | |
otherModelValue: "=compareTo" | |
}, | |
link: function(scope, element, attributes, ngModel) { | |
ngModel.$validators.compareTo = function(modelValue) { | |
return modelValue == scope.otherModelValue; |
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
# paste in bashrc | |
alias ls="ls --color=auto" | |
alias ll="ls --color -al" | |
alias grep='grep --color=auto' | |
# md5check [file] [key] | |
md5check() { md5sum "$1" | grep "$2";} | |
# Generate strong password | |
alias genpasswd="strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo" |
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
# | |
# CMake configuration | |
# | |
# Please refer to http://www.cmake.org/cmake/help/documentation.html | |
# You may also refer to http://www.cmake.org/cmake/help/syntax.html for a quick | |
# introduction to CMake's syntax. | |
cmake_minimum_required (VERSION 2.8) | |
# The name of our project is "BLE_HEART_RATE". CMakeLists files in this project can |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css">...</style> | |
<script type="text/JavaScript"> | |
window.onload = function() { | |
var txt = document.getElementById('txt'); | |
txt.value = window.onload + ''; | |
document.getElementById('link').onclick = function(code) { | |
this.href = 'data:text/plain;charset=utf-8,' |
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
package org.wikibrain.cookbook.MOOC; | |
import com.vividsolutions.jts.geom.Geometry; | |
import gnu.trove.iterator.TIntIterator; | |
import gnu.trove.set.TIntSet; | |
import org.geotools.referencing.GeodeticCalculator; | |
import org.wikibrain.conf.ConfigurationException; | |
import org.wikibrain.conf.Configurator; | |
import org.wikibrain.core.cmd.Env; | |
import org.wikibrain.core.cmd.EnvBuilder; |
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
import android.transition.AutoTransition; | |
import android.transition.Scene; | |
import android.transition.Transition; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.animation.AccelerateDecelerateInterpolator; | |
import android.widget.RelativeLayout; | |
import android.transition.TransitionManager; | |
public class TransitionsActivity extends Activity { |