Skip to content

Instantly share code, notes, and snippets.

View davetrux's full-sized avatar

David Truxall davetrux

View GitHub Profile
@ran488
ran488 / build.gradle
Created April 25, 2014 13:59
Running Fortify from Gradle build. These are the snippets of code you can add to your build.gradle to run the analyzer and spit out a Fortify *.fpr file. Fortify is not F/OSS, so you (your company) will need a license, so the dependencies won't be out in public repo's. You will have to add it to your company's private repo (e.g. Artifactory).
// Add a new configuration
configurations {
fortify { extendsFrom compile }
}
// pull in the fortify libs for the new configuration
dependencies {
fortify 'com.fortify:sourceanalyzer:3.90'
}
@PrashamTrivedi
PrashamTrivedi / publish.gradle
Created August 27, 2015 07:24
Gradle file for copying release ready apk to desired directory.
def getReleasePath() {
//Define RELEASE_PATH anywhere(in properties file) and your apk + mapping file will be copied there.
return hasProperty('RELEASE_PATH') ? RELEASE_PATH : "${project.rootDir}\\Release"
}
android.applicationVariants.all { variant ->
//Mapping file for proguard path for each variant
def mappingFile = variant.variantData.mappingFile
@minsik-ai
minsik-ai / Jetbrains IDE Essential Shortcuts.md
Last active February 18, 2021 04:50
Essential Shortcuts for Jetbrains IDEs, including IntelliJ IDEA, Android Studio & others.

Jetbrains IDE Essential Shortcuts

This is a list of Jetbrains IDE shortcuts I use everyday.

Comments welcome! Tell me your favorites.

Navigating Between Windows

Change Focus to Window

@jherax
jherax / sortBy.js
Last active May 31, 2021 07:50
Sorts an array with multiple ordering criteria (Schwartzian transform)
/**
* Sorts an array and allows multiple sorting criteria.
*
* It applies the Schwartzian transform:
* https://en.wikipedia.org/wiki/Schwartzian_transform
*
* Author: David Rivera
* Github: https://github.com/jherax
*
* You can fork this project on github:
@ZkHaider
ZkHaider / expand-collapse.java
Last active January 30, 2022 02:31
Simple Expand / Collapse RecyclerView Item
public static class ExampleViewHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
private int originalHeight = 0;
private boolean isViewExpanded = false;
private YourCustomView yourCustomView
public ExampleViewHolder(View v) {
super(v);
v.setOnClickListener(this);
@AngeloAnolin
AngeloAnolin / web.config
Created March 11, 2017 02:56
Web Configuration for Vue Applications Hosted in IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Handle History Mode and custom 404/500" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@kristofferh
kristofferh / git-export
Created December 7, 2011 13:01
"Export" a git repository to zip file
git archive --format zip --output /full/path/to/zipfile.zip master
@luisciphere
luisciphere / Bootstrap Table CSS
Last active August 29, 2023 06:06
Bootstrap tables only css
.table {
width: 100%;
max-width: 100%;
margin-bottom: 1rem;
}
.table th,
.table td {
padding: 0.75rem;
vertical-align: top;
@ACK-J
ACK-J / ThreatMetrixEndpoints.txt
Last active November 10, 2023 09:16
All endpoints currently known which are used to run ThreatMetrix's invasive data collection scripts
*.caesarscasino.com
*.credit24.com
*.credit24.com.au
*.creditea.com
*.fashionette.de
*.hapipozyczki.pl
*.ideafinancial.com
*.mohegansuncasino.com
*.online-metrix.net
*.qa.threatmetrix.com
@dianjuar
dianjuar / Install update WordPress puglins directly.md
Last active April 16, 2024 12:21
Install update WordPress plugins without providing ftp access

Install WordPress plugins directly (without FTP)

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');