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
<?php | |
header('Access-Control-Allow-Origin: *'); | |
// was used when API address moved but apps were live on app store. | |
// create curl resource | |
$ch = curl_init(); | |
error_log($_GET['m']); | |
// set url | |
curl_setopt($ch, CURLOPT_URL, "http://your.node.host:3000/sendmsg?m=" . $_GET['m']); |
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 app requires the express and serialport libraries for node. You can get them on NPM with: | |
//npm install express | |
//npm install serialport | |
var app = require('express')(); | |
var http = require('http').Server(app); | |
var SerialPort = require("serialport").SerialPort; | |
var serialPort = new SerialPort("COM3", { //change port to your Arduinos port | |
baudrate: 9600, |
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
song = ""; | |
setInterval(function() { | |
if (song != $('#track-name').find('a').text().replace(/ /g, "~") + '|' + $('#track-artist > a').text().replace(/ /g, "~")) { | |
song = $('#track-name').find('a').text().replace(/ /g, "~") + '|' + $('#track-artist > a').text().replace(/ /g, "~"); | |
$.ajax({ | |
//The URL to process the request | |
'url': 'https://your.webserver/relay.php?m=' + song, | |
'type': 'GET', | |
'success': function(data) { | |
if (data == "success") { |
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
/* | |
LiquidCrystal Library - Serial Input | |
Demonstrates the use a 16x2 LCD display. The LiquidCrystal | |
library works with all LCD displays that are compatible with the | |
Hitachi HD44780 driver. There are many of them out there, and you | |
can usually tell them by the 16-pin interface. | |
This sketch displays text sent over the serial port | |
(e.g. from the Serial Monitor) on an attached LCD. |
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
@SubscribeEvent(priority=EventPriority.LOWEST) | |
public void onChunkLoad(ChunkEvent.Load event) { | |
int chunkX = event.getChunk().xPosition; | |
int chunkZ = event.getChunk().zPosition; | |
int cornerX = chunkX*16; | |
int cornerZ = chunkZ*16; | |
//System.out.println("chunk at " + chunkX + ", " + chunkZ + " getting loaded"); | |
//System.out.println("Boundries at " + cornerX + ", " + cornerZ); |
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
public boolean equals(RadChunk chunk){ | |
if(this.x == chunk.x && this.z == chunk.z){ | |
return true; | |
} | |
return false; | |
} |
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
else{ | |
System.out.println("Handled"); | |
RadiationEventHandler.chunkList.put(chunk, new ArrayList<Point3D>()); | |
int modCornerX = n*16; | |
int modCornerZ = m*16; | |
for(int i = modCornerX; i <= modCornerX+15; i++){ | |
for(int k = modCornerZ; k <= modCornerZ+15; k++){ | |
for(int j = 0; j <= 255; j++){ | |
Block sourceBlock = player.worldObj.getBlock(i, j, k); |
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
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
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
<VirtualHost *:80> | |
ServerName dev.dom1.com | |
Redirect permanent / https://dev.dom1.com/ | |
</VirtualHost> |
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
SSLCompression off | |
SSLProtocol All -SSLv2 -SSLv3 | |
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH | |
SSLOpenSSLConfCmd DHParameters "/etc/ssl/certs/dhparam.pem" |
OlderNewer