Skip to content

Instantly share code, notes, and snippets.

@Dr-Emann
Dr-Emann / core-haxelib.json
Created May 29, 2013 17:41
Haxe haxelib.json's for polygonal libraries
{
"name": "polygonal-core",
"license": "MIT",
"tags": ["cross", "utility"],
"description": "core library used by other polygonal libraries",
"contributors":"polygonal",
"version": "1.0.2",
"url": "https://github.com/polygonal/core",
"dependencies": {
"polygonal-ds":""
package ;
/**
* ...
* @author Zachary Dremann
*/
#if macro
import haxe.macro.Expr;
import haxe.macro.Context;
@Dr-Emann
Dr-Emann / Main.hx
Created March 13, 2012 06:25
Testing Haxe Rounding Speeds
package net.zdremann.tmp.roundto;
import de.polygonal.core.fmt.Sprintf;
import de.polygonal.core.math.Limits;
import de.polygonal.core.math.Mathematics;
import haxe.Timer;
import nme.display.Sprite;
import nme.events.Event;
import nme.Lib;
#if !js
@Dr-Emann
Dr-Emann / Machine.java
Created February 27, 2012 18:40
Getting ESuds info from Java
package;
public class Machine {
public Machine()
{
this.status = MachineStatus.UNKNOWN;
}
public Machine(final int id, final int num, MachineStatus status)
{
this.id = id;
@Dr-Emann
Dr-Emann / JavaGetUrl.java
Created December 29, 2011 22:00
How can I download the contents of a URL using Java?
//------------------------------------------------------------//
// JavaGetUrl.java: //
//------------------------------------------------------------//
// A Java program that demonstrates a procedure that can be //
// used to download the contents of a specified URL. //
//------------------------------------------------------------//
// Code created by Developer's Daily //
// http://www.DevDaily.com //
//------------------------------------------------------------//
pub struct Brick {
pub peer: Peer,
pub path: Path,
}
use std::fmt;
impl fmt::Display for Brick {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}:{}", self.peer.hostname, self.path.display())

Keybase proof

I hereby claim:

  • I am dr-emann on github.
  • I am dr_emann (https://keybase.io/dr_emann) on keybase.
  • I have a public key whose fingerprint is 4CC6 37E4 32B9 86CB 25A1 7977 D9AC DE1A 2C61 D85D

To claim this, I am signing this object:

@Dr-Emann
Dr-Emann / gc_count.rs
Last active August 29, 2015 14:04 — forked from samuell/gc_count.rs
//based off https://gist.github.com/samuell/5555803
use std::fs::File;
use std::io::BufReader;
use std::io::prelude::*;
use std::env;
fn main() {
let mut file = BufReader::new(File::open("Homo_sapiens.GRCh37.67.dna_rm.chromosome.Y.fa"));
let content = gc_content(&mut file);
println!("{:.2}", content * 100.0);
extern crate getopts;
use std::io::{File, Open, Read};
use std::path::Path;
use std::io::{Command};
use std::string::{String};
use std::os;
use std::str;
#include <stdio.h>
int main() {
FILE *fp;
int i;
fp = fopen("\\\\.\\PhysicalDrive0", "r");
for(i = 0; i < 10; i++) {
printf("%x", (int)fgetc(fp));
}
return 0;