- No 18+ content, this includes violence, nudity, gore, animal abuse, etc
- No politics/religion/culture/identity debate, discussion etc.
- No attacks, harassment, or sexual misconduct against members or groups.
- No warning, mute, or ban dodging.
- No encouraging or providing unofficial downloads/piracy for mods, game content, etc.
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 static long parseTimestamp(String strTimestamp){ | |
/** Parsing inconsistent timestamps: | |
* 1 - Sometime they are longs e.g. 230923409234 (Timestamp in milliseconds) | |
* 2 - Another format is double e.g. 234234234.234 (Timestamp in milliseconds / 1000) | |
* 3 - Even integers on occasion e.g. 234234234 (Timestamp in seconds) | |
* 4 - Also e-notation e.g. 1.382298592059E9 (Timestamp in milliseconds / 1000) | |
* 5 - And e-notation for doubles e.g. 1.380604046071e+12 (Timestamp in milliseconds) | |
* | |
* All timestamps in seconds are less than the maximum value of an Integer (2147483647). | |
* All timestamps in milliseconds are greater than the maximum value of an Integer (2147483647). |
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
function java7 | |
{ | |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home | |
export JAVA_HOME | |
} | |
function java8 | |
{ | |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home | |
export JAVA_HOME |
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 subprocess | |
import shlex | |
import sys | |
import os | |
# Define function to print a single ansible inventory line from a dictionary of ssh-config values. | |
def printInventoryLine(host): | |
print ("{0} ansible_ssh_host={1} ansible_ssh_port={2} " + | |
"ansible_ssh_private_key_file={3} ansible_ssh_user={4}" | |
).format(host["Host"], host["HostName"], host["Port"], host["IdentityFile"], host["User"]) |
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
### Keybase proof | |
I hereby claim: | |
* I am feldoh on github. | |
* I am dexter (https://keybase.io/dexter) on keybase. | |
* I have a public key whose fingerprint is 78BE 5281 DC44 2A16 8ED1 A208 2554 1F32 A533 3CAA | |
To claim this, I am signing this object: |
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 class LiverProtectionHediffGene : Gene | |
{ | |
public static Lazy<HediffDef> LiverProtectionHediff = new(() => DefDatabase<HediffDef>.GetNamed("Your_Cool_Hediff")); | |
public override void PostRemove() | |
{ | |
if (GetHediff() is { } firstHediffOfDef) | |
pawn.health.RemoveHediff(firstHediffOfDef); | |
base.PostRemove(); |
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 os | |
from lxml import etree | |
def find_about_folder(path): | |
while path != os.path.dirname(path): # stop at root directory | |
if 'About' in os.listdir(path): | |
return os.path.join(path, 'About') | |
path = os.path.dirname(path) | |
return None |