Skip to content

Instantly share code, notes, and snippets.

Trung trungie

Block or report user

Report or block trungie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
balupton /
Last active Nov 6, 2019
Convert XPS to PDF on Linux and Mac using bash

Convert XPS to PDF on Linux and Mac

  1. Download this file

  2. chmod +x ./xps2pdf.bash

  3. To convert a particular xps file: ./xps2pdf.bash thefile.xps

  4. To convert all xps files in the current working directory: ./xps2pdf.bash *.xps

duyetdev / duyetdev-spark-to-parquet.scala
Created Sep 21, 2016
Spark convert CSV to Parquet.
View duyetdev-spark-to-parquet.scala
def convert(sqlContext: SQLContext, filename: String, schema: StructType, tablename: String) {
// import text-based table first into a data frame.
// make sure to use com.databricks:spark-csv version 1.3+
// which has consistent treatment of empty strings as nulls.
val df =

JProfiler with Docker



DockerFile should have JProfiler installation.

RUN wget <JProfiler file location> -P /tmp/ && \
  tar -xzf /tmp/<JProfiler file> -C /usr/local && \
  rm /tmp/<JProfiler file>
# Script to remove GPG key from git-crypt
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.
jorihardman / sumo_logic.config
Last active Mar 28, 2018
Elastic Beanstalk Sumo Logic Config
View sumo_logic.config
# This will automatically install the Sumo Logic collector on AWS Elastic
# Beanstalk instances. Add this to the .ebextensions folder in your app root
# and edit L24-25 to match your Sumo Logic accessid and accesskey. To add or
# remove tracked files, simply add or remove source hashes to the sources
# array on L36.
topheman /
Created Aug 4, 2015
Travis setup of Github token for jspm
staringispolite / asciiputsonglasses
Last active Oct 31, 2019
Ascii art sunglasses meme
View asciiputsonglasses
Puts on glasses:
( •_•)>⌐■-■
Takes off glasses ("mother of god..."):
( •_•)>⌐■-■
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Log;
JakeWharton /
Last active May 12, 2019
A Gson TypeAdapterFactory which allows serialization of @autovalue types. Apache 2 licensed.
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p>
You can’t perform that action at this time.