Skip to content

Instantly share code, notes, and snippets.

Avatar

David Truxall davetrux

View GitHub Profile
@AngeloAnolin
AngeloAnolin / web.config
Created Mar 11, 2017
Web Configuration for Vue Applications Hosted in IIS
View web.config
<?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" />
@trent-dev
trent-dev / Jetbrains IDE Essential Shortcuts.md
Last active Feb 18, 2021
Essential Shortcuts for Jetbrains IDEs, including IntelliJ IDEA, Android Studio & others.
View Jetbrains IDE Essential Shortcuts.md

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

@dianjuar
dianjuar / Install update WordPress puglins directly.md
Last active Jul 27, 2021
Install update WordPress plugins without providing ftp access
View Install update WordPress puglins directly.md

Install WordPress plugins directly (without FTP)

Ref Stack Overflow Comment

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
@ziadoz
ziadoz / install.sh
Last active Jul 22, 2021
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
View install.sh
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@jherax
jherax / sortBy.js
Last active May 31, 2021
Sorts an array with multiple ordering criteria (Schwartzian transform)
View sortBy.js
/**
* 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:
@subfuzion
subfuzion / curl.md
Last active Aug 5, 2021
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@PrashamTrivedi
PrashamTrivedi / publish.gradle
Created Aug 27, 2015
Gradle file for copying release ready apk to desired directory.
View publish.gradle
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
@ZkHaider
ZkHaider / expand-collapse.java
Last active Jun 15, 2020
Simple Expand / Collapse RecyclerView Item
View expand-collapse.java
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);
@ran488
ran488 / build.gradle
Created Apr 25, 2014
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).
View build.gradle
// Add a new configuration
configurations {
fortify { extendsFrom compile }
}
// pull in the fortify libs for the new configuration
dependencies {
fortify 'com.fortify:sourceanalyzer:3.90'
}
@kristofferh
kristofferh / git-export
Created Dec 7, 2011
"Export" a git repository to zip file
View git-export
git archive --format zip --output /full/path/to/zipfile.zip master