Skip to content

Instantly share code, notes, and snippets.

View LaudemPax's full-sized avatar
🛠️
Building something (hopefully) cool

Muhammad Aman LaudemPax

🛠️
Building something (hopefully) cool
  • Augsburg, Germany
View GitHub Profile
void setup(){
//big speaker
pinMode(3,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
pinMode(13,OUTPUT);
}
@LaudemPax
LaudemPax / String to dom
Created December 13, 2013 13:42
Takes a string of xml and writes it to an xml file
public static void stringToDom(String xmlSource)
throws SAXException, ParserConfigurationException, IOException, TransformerException {
//parse the given input
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
org.w3c.dom.Document doc = builder.parse(new InputSource(new StringReader(xmlSource)));
//write the document
TransformerFactory transformerFactory = TransformerFactory.newInstance();
@LaudemPax
LaudemPax / YoutubeStream.py
Last active October 31, 2018 20:54
small python script which takes a youtube url and streams the video directly to your desktop. Requires youtube-dl and mplayer.
#!/usr/bin/env/python
from os import system as syscommand
class PlayVideo():
def __init__(self):
self.getUrl();
@LaudemPax
LaudemPax / QuadTree.java
Created March 16, 2013 02:44
My Quadtree
public class Quadtree {
//maximum entities in each sector
private int MAX_ENT = 10;
//maximum number of levels
private int MAX_LEVELS = 5;
private int level;
private Array<Entity> collideEntities;