Skip to content

Instantly share code, notes, and snippets.

@georgeOsdDev
georgeOsdDev / FROM REPL
Last active December 26, 2015 17:49
Failed to parse XML document. ##This is reproduce flow. 1. Capture tcpflow ``` sudo tcpflow -c -i lo0 src or dst host localhost ``` 2. Do scala script from REPL ##Solution Add `elementText = elementText.trim();` in `com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser#endElement`
import java.io.ByteArrayInputStream
import scala.collection.JavaConversions._
import scala.io.Source
import scala.util.control.NonFatal
import com.amazonaws.{AmazonClientException, AmazonServiceException}
import com.amazonaws.{ClientConfiguration, Protocol}
import com.amazonaws.auth.BasicAWSCredentials
import com.amazonaws.services.s3.AmazonS3Client
{
"ts" : ISODate("2012-09-14T16:34:00.010Z"), // date it occurred
"op" : "query", // the operation type
"ns" : "game.players", // the db and collection
"query" : { "total_games" : 1000 }, // query document
"ntoreturn" : 0, // # docs returned with limit()
"ntoskip" : 0, // # of docs to skip()
"nscanned" : 959967, // number of docs scanned
"keyUpdates" : 0, // updates of secondary indexes
"numYield" : 1, // # of times yields took place
@xtranophilist
xtranophilist / install-mscorefonts.sh
Created December 27, 2012 14:28
Install 'Times New Roman' and other proprietary fonts in Fedora
yum install rpm-build cabextract ttmkfdir
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
rpmbuild -bb msttcorefonts-2.5-1.spec
rpm -ivh $HOME/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm
fc-cache -f -v
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"