Skip to content

Instantly share code, notes, and snippets.

View pdodds's full-sized avatar

Philip Dodds pdodds

View GitHub Profile
WorkbookReference workbook = new WorkbookBuilder().sheet().title("People").from(people).endSheet().build();
workbook.toFile("/tmp/test.xlsx");
@pdodds
pdodds / person.java
Last active June 20, 2019 11:05
Example of Excel annotations
@Data
Class Person {
@ExcelColumn(header="Person Name")
private String name;
@ExcelColumn(header="Person Age")
private int age;
@ExcelColumn(ignore=true)
val sqlContext = new org.apache.spark.sql.SQLContext(sc)
import sqlContext.implicits._
import org.apache.spark.sql.types.Decimal
case class Trade(quantity: Decimal,price: Decimal)
val data = Seq.fill(5) {
val price = Decimal(20+scala.util.Random.nextInt(10))
val quantity = Decimal(20+scala.util.Random.nextInt(10))
FSCK started by hdfs (auth:SIMPLE) from /192.168.10.11 for path / at Sun Oct 12 08:56:28 EDT 2014
.....................................
/hbase/oldWALs/ben%2C60020%2C1413055998291.1413056003839: Under replicated BP-1437330212-192.168.10.11-1412875471576:blk_1073744180_3639. Target Replicas is 3 but found 1 replica(s).
.....................
/hbase/oldWALs/eko%2C60020%2C1412893665747.1412987272502: Under replicated BP-1437330212-192.168.10.11-1412875471576:blk_1073744142_3409. Target Replicas is 3 but found 1 replica(s).
.
/hbase/oldWALs/eko%2C60020%2C1413055997784.1413056003797: Under replicated BP-1437330212-192.168.10.11-1412875471576:blk_1073744182_3640. Target Replicas is 3 but found 1 replica(s).
.....................
/hbase/oldWALs/sawyer%2C60020%2C1412893666049.1412987272730: Under replicated BP-1437330212-192.168.10.11-1412875471576:blk_1073744140_3402. Target Replicas is 3 but found 1 replica(s).
.
### Keybase proof
I hereby claim:
* I am pdodds on github.
* I am pdodds (https://keybase.io/pdodds) on keybase.
* I have a public key whose fingerprint is 44F6 7088 6109 B331 A9BA 8480 1D43 3916 87A3 932C
To claim this, I am signing this object:
@pdodds
pdodds / README.md
Created March 20, 2014 15:46
Dividends

README is empty

http://www.tecmint.com/upgrade-linux-mint-15-olivia-to-linux-mint-16-petra/
$ sudo sed -i 's/raring/saucy/' /etc/apt/sources.list
$ sudo sed -i 's/olivia/petra/' /etc/apt/sources.list
$ sudo sed -i 's/raring/saucy/' /etc/apt/sources.list.d/official-package-repositories.list
$ sudo sed -i 's/olivia/petra/' /etc/apt/sources.list.d/official-package-repositories.list
$ sudo apt-get update && sudo apt-get dist-upgrade
$ sudo apt-get upgrade
var io = require('socket.io').listen(server);
var usernames = {}
io.sockets.on('connection', function (socket) {
// when the client emits 'sendchat', this listens and executes
socket.on('sendchat', function (data) {
// we tell the client to execute 'updatechat' with 2 parameters
io.sockets.emit('updatechat', socket.username, data);
class RequestBuilder < Resque::JobWithStatus
@queue = “file_builds”
ActiveRecord::Base.verify_active_connections!
def perform
build_file = Files.find(options[‘file_id’])
FileReport.run_report(build_file.description)
end
end
DEBUG: Looking for bootstrap template in /home/ubuntu/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.2/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /home/ubuntu/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.2/lib/chef/knife/bootstrap
DEBUG: Adding ec2-75-101-225-196.compute-1.amazonaws.com
DEBUG: establishing connection to ec2-75-101-225-196.compute-1.amazonaws.com:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: read 0 bytes
DEBUG: read 0 bytes
DEBUG: read 0 bytes
DEBUG: read 0 bytes