This file contains hidden or 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
class ExampleClass{ | |
constructor(a){ | |
this.a = a; | |
} | |
someMethod(){ | |
const outerThis = this; | |
someOtherMethod(function(b){ | |
outerThis.a = b; | |
}); | |
} |
This file contains hidden or 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
//------------------------- Method 1 | |
class TestClass1{ | |
constructor(a){ | |
this.a = a; | |
} | |
static someMethod(){ | |
return new this(5); | |
} |
This file contains hidden or 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
//Note: | |
//Requires jQuery! Also, you need to define a CSS class for .highlight | |
//Something like: .highlight{background-color: #ff96da;} | |
function getSelectionText() { //Thanks https://stackoverflow.com/a/5379408 | |
var text = ""; | |
if (window.getSelection) { | |
text = window.getSelection().toString(); | |
} else if (document.selection && document.selection.type != "Control") { | |
text = document.selection.createRange().text; |
This file contains hidden or 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 dim = 256; | |
var offset = 5; | |
var randomSources = [ | |
{ | |
rBool: function(){ | |
return Math.random() >= 0.5; | |
//return 1; | |
} | |
}, |
This file contains hidden or 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" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); |