Skip to content

Instantly share code, notes, and snippets.

View loonix's full-sized avatar
:shipit:
Open sourcing as much I can

Daniel Carneiro loonix

:shipit:
Open sourcing as much I can
  • CADS UK
  • Vila Nova de Gaia, PT
View GitHub Profile
@loonix
loonix / XSL-FO - Helpers
Last active December 11, 2017 11:50
XSL-FO Check if Value is EMPTY or NULL or has a SPACE
<!-- Example when tag is like this <Category /> -->
<xsl:if test="./Category">
1
</xsl:if>
<xsl:if test="not(./Category)">
2
</xsl:if>
<xsl:if test="./Category != ''">
@loonix
loonix / tocXSL.xml
Created August 25, 2017 07:28
Table of Contents XSL
<xsl:template name="genTOC">
<fo:block break-after="page">
<fo:block space-after="5mm">Table of Contents</fo:block>
<xsl:for-each select="//PATH">
<fo:block text-align-last="justify">
<xsl:value-of select="./Name" />:
<fo:basic-link internal-destination="{generate-id(.)}">
<fo:leader leader-pattern="dots" leader-pattern-width="2mm" />
<fo:page-number-citation ref-id="{generate-id(.)}" />
@loonix
loonix / PFX-TO-JKS-BUILD-SIGNED-APK
Last active August 21, 2017 09:19
Convert .PFX files into .JKS key and Build signed Android APK
If your certificate's file format is in pfx you will need to export it to a jks format. Follow these steps to do that:
* Access the following website and download KeyStore Explorer:
* http://keystore-explorer.org/downloads.html
* Open Key Store Explorer
* Open the key file (.pfx or other format)
* Type the certificate password
* Go to File > Save As
* Select JKS type and save it.
@loonix
loonix / moveshelvesheettootherbranch.txt
Created August 7, 2017 08:46
Move Shelveset to another branch
Move Shelveset to a Different Branch in TFS
Want to move a shelveset to a different branch? It’s more painful than I realised, but not to worry, here’s exactly what you need to do.
Step 1: Preparation
Make sure your source branch and target branch are both up to date by running Get Latest Changes. If you don’t you may receive the error:
“Unable to determine the workspace.”
Make sure you’ve created your shelveset and there are no pending changes for either branch. This includes the changes you just shelved! If you don’t you may receive the error:
@loonix
loonix / Fetch-.CSV-Attachment-From-Gmail.gs
Created January 27, 2017 17:56
Get .CSV from gmail and copy it to a Google Spreadsheet
var targetFile = "SPREADSHEETKEY"; // Output file
var targetSheet = "SHEETNAME"; // output sheet
function Main() {
var CurrentDate = new Date() ;
var CurrentDateFormat = Utilities.formatDate(CurrentDate, "GMT", "MM.dd.YYYY") ; // YOU CAN CHOOSE ANOTHER FORMAT HERE
var ss = SpreadsheetApp.openById('SHEETNAME');
var CSVDD = ss.getSheetByName('SHEETNAME');