vboxmanage list vms
vboxmanage unregistervm <uuid> --delete
| // Encrypt where jo is input, and query is output and ENCRPYTION_KEy is key | |
| byte[] input = jo.toString().getBytes("utf-8"); | |
| MessageDigest md = MessageDigest.getInstance("MD5"); | |
| byte[] thedigest = md.digest(ENCRYPTION_KEY.getBytes("UTF-8")); | |
| SecretKeySpec skc = new SecretKeySpec(thedigest, "AES/ECB/PKCS5Padding"); | |
| Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); | |
| cipher.init(Cipher.ENCRYPT_MODE, skc); | |
| byte[] cipherText = new byte[cipher.getOutputSize(input.length)]; |
| var phantom = require('phantom'), | |
| vows = require('vows'), | |
| assert = require('assert'); | |
| // nesting tests inside phantom callback so we only | |
| // have to create it once | |
| phantom.create(function(ph) { | |
| var get_page_result = function(url, fn, result) { | |
| ph.createPage(function(page) { |
| public void testKafka() throws Exception { | |
| Properties props = new Properties(); | |
| props.put("zk.connect", "zookeeper.cloudfront.io:2181"); | |
| props.put("zk.sessiontimeout.ms", "300000"); | |
| props.put("serializer.class", "kafka.serializer.DefaultEncoder"); | |
| props.put("key.serializer.class", "kafka.serializer.StringEncoder"); | |
| props.put("compression.codec", "1"); // gzip | |
| props.put("producer.type", "async"); | |
| props.put("batch.size", "248"); | |
| props.put("queue.enqueueTimeout.ms", "-1"); |
| https://github.com/tdunning/MiA/blob/mahout-0.7/src/main/java/mia/clustering/ch07/SimpleKMeansClustering.java#L24 |
| # create our table | |
| create 'impressions', { NAME => 'event', COMPRESSION => 'LZO' } | |
| # see what's inside it | |
| describe 'impressions' | |
| # add some data | |
| put 'impressions', '20130512', 'event:type', 'click' | |
| put 'impressions', '20130512', 'event:ad', '1234' | |
| put 'impressions', '20130512', 'event:campaign', '9283372' |
| function drawVisualization() { | |
| // Create and populate the data table. | |
| // sum total distinct rows and then take each group % of share of total distinct | |
| var data = google.visualization.arrayToDataTable([ | |
| ['Year', 'Group A', 'Group B', 'Group C', 'Group D'], | |
| ['Group A', 100, 100, 100, 100], | |
| ['Group B', 100, 100, 100, 100], | |
| ]); | |
| // Create and draw the visualization. |
| http://askubuntu.com/questions/183132/automated-installation-using-preseeding-from-url-failed-from-within-virtualbox |
| # install ruby http://rubyinstaller.org/downloads/ | |
| http://rubyforge.org/frs/download.php/76798/rubyinstaller-1.9.3-p392.exe | |
| # download and configure devkit for windows @http://rubyinstaller.org/downloads/ | |
| https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe | |
| cd <DEVKIT_INSTALL_DIR> | |
| ruby dk.rb init | |
| ruby dk.rb review | |
| ruby dk.rb install |