Skip to content

Instantly share code, notes, and snippets.

View domadev812's full-sized avatar
๐Ÿ˜Š
Always be ready!

Full-Stack Web Developer domadev812

๐Ÿ˜Š
Always be ready!
View GitHub Profile
@domadev812
domadev812 / 1.bash
Last active November 15, 2017 21:06 — forked from ToeJamson/1.bash
Publishing Android Location on a Live-Updating Map (MapBox)
<dependency>
<groupId>com.pubnub</groupId>
<artifactId>pubnub-gson</artifactId>
<version>4.14.0</version>
</dependency>
@domadev812
domadev812 / 0.txt
Last active November 15, 2017 21:06 — forked from girliemac/0.txt
Snippets for D3 Bubble Chart blog
Demo: http://pubnub.github.io/d3-bubble/
Tutorial: http://www.developer.com/java/fun-with-d3.js-data-visualization-eye-candy-with-streaming-json.html
@domadev812
domadev812 / 1.java
Last active November 15, 2017 21:06 — forked from ToeJamson/1.java
How to Build an Android Beacon (iBeacon) Emitter [3/3]
protected void setAdvertiseData() {
AdvertiseData.Builder mBuilder = new AdvertiseData.Builder()
ByteBuffer mManufacturerData = ByteBuffer.allocate(24);
byte[] uuid = getIdAsByte(UUID.fromString("0CF052C297CA407C84F8B62AAC4E9020"));
mManufacturerData.put(0, (byte)0xBE); // Beacon Identifier
mManufacturerData.put(1, (byte)0xAC); // Beacon Identifier
for (int i=2; i<=17; i++) {
mManufacturerData.put(i, uuid[i-2]); // adding the UUID
}
mManufacturerData.put(18, (byte)0x00); // first byte of Major
@domadev812
domadev812 / 1.html
Last active November 15, 2017 21:06 — forked from ToeJamson/1.html
Realtime Location Tracking on a Map using JavaScript
<script type="text/javascript" src="http://pubnub.github.io/eon/lib/eon-map.js"></script>
<link type="text/css" rel="stylesheet" href="http://pubnub.github.io/eon/lib/eon.css" />
<div id='map'></div>
<script type="text/javascript">
var pubnub = new PubNub({
publishKey: 'demo',
subscribeKey: 'demo'
});
eon.map({
pubnub: pubnub,
@domadev812
domadev812 / 1.js
Last active November 15, 2017 21:06 — forked from ToeJamson/1.js
Random Matchmaking (MemeWarz 5)
pubnub.subscribe({
channels: [channel],
state: {
skill: 2
}
});
pubnub.addListener({
status: function(statusEvent) {
},
@domadev812
domadev812 / PubNubKeys.html
Last active November 15, 2017 21:06 — forked from ToeJamson/PubNubKeys.html
Sample PubNub Keys
<!-- Include the PubNub Library -->
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script>
<!-- Instantiate PubNub -->
<script type="text/javascript">
var pubnub = new PubNub({
subscribeKey: 'Unique Subscribe Key Here',
publishKey: 'Unique Publish Key Here',
ssl: true
@domadev812
domadev812 / 1.html
Last active November 15, 2017 21:06 — forked from ToeJamson/1.html
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
@domadev812
domadev812 / 1.py
Last active November 15, 2017 21:06 — forked from stephenlb/1.py
topic = "user/path/topic"
@domadev812
domadev812 / 1.js
Last active November 15, 2017 21:06 — forked from ToeJamson/1.js
Shyam Mongo DB Blog
var pubnub = new PubNub({
publishKey : 'demo',
subscribeKey : 'demo'
})
@domadev812
domadev812 / 1.swift
Last active November 15, 2017 21:06 — forked from ToeJamson/1.swift
Smart iBeacons in the Swift Programming Language
class Brain: NSObject, PNDelegate {
let configuration = PNConfiguration(publishKey: "demo", subscribeKey: "demo")
var channel = PNChannel()
var serverStatus = UILabel()
init() {
super.init()
}
}