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
navigator.mozBluetooth.defaultAdapter.startLeScan([]).then(handle => { | |
console.log('Start scanning', handle); | |
handle.ondevicefound = e=> { | |
var record = parseScanRecord(e.scanRecord); | |
if (record) { | |
console.log('Found an iBeacon', record.uuid, record.major, record.minor, e.rssi); | |
} | |
} | |
setTimeout(() => { |
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
//----------------------------------------------------------------------------- | |
// The MIT License | |
// | |
// Copyright (c) 2009 Patrick Mueller | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of | |
// this software and associated documentation files (the "Software"), to deal in | |
// the Software without restriction, including without limitation the rights to | |
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
// of the Software, and to permit persons to whom the Software is furnished to do |
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 module = angular.module('facebook', []); | |
module.constant('facebookInit', function(facebookAppID) { | |
var initialized = false; | |
return function($q) { | |
if (initialized) { | |
return; |
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
#!/bin/bash | |
PROJECT_NAME=MyApp | |
SCHEME_NAME=MyApp | |
STARTTIME=$(date +%s); | |
set -e | |
set -x | |
### Install dependencies | |
echo "--- Install dependencies [Time Elapsed $(($(date +%s) - $STARTTIME))s]" |
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
#!/bin/bash | |
cat << EOF | |
########################################################### | |
# Workaround adb disconnecting issue on macOS Sierra | |
# | |
# More info: | |
# https://code.google.com/p/android/issues/detail?id=219085 | |
# credits to: hans...@meetme.com, vs...@google.com | |
########################################################### |
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
#!/bin/sh | |
USER=alex # <--- Put your username here | |
SSID=LILLE1 | |
INTERFACE=$1 | |
STATUS=$2 | |
case $INTERFACE in | |
wlan0) | |
case $STATUS in |
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
// This Cordova Hook (script) removes "AdSupport.framework" and "libAdIdAccess" references | |
// from the cordova-plugin-google-analytics plugin, as well as removes it from | |
// references found in the corresponding node_module and .project.pbxproj. | |
// The authoritive source is found at: https://gist.github.com/SteveKennedy | |
module.exports = function (ctx) { | |
console.log("Attempting To Remove Ad (IDFA) References from project....") | |
var pluginName = 'cordova-plugin-google-analytics'; |
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> | |
<body> | |
//Note the value attribute rather than ng-model | |
<spin value="someScopeValue" min="1" max="{{someOtherScopeValue}}" step="2" /> | |
$scope.someScopeValue = 2; | |
$scope.someOtherScopeValue = 20; | |
</body> |
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
#!/bin/bash -e | |
# /usr/local/sbin/raspi-monitor | |
# Script to enable and disable the HDMI signal of the Raspberry PI | |
# Inspiration: http://www.raspberrypi.org/forums/viewtopic.php?t=16472&p=176258 | |
CMD="$1" | |
function on { | |
/opt/vc/bin/tvservice --preferred |
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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
OlderNewer