Skip to content

Instantly share code, notes, and snippets.

View de314's full-sized avatar

David Esposito de314

  • BetterCloud
  • Atlanta
View GitHub Profile
@de314
de314 / skuScraper.js
Created April 16, 2015 01:59
Get stuff for Lizz
var $=jQuery,
currPaginationText,
rawSkus = [],
mapping = {
url: window.location.href,
skus: rawSkus
};
function getSkus() {
var skus = $('[id^="sku"]').filter(function() {
@de314
de314 / grepkill.sh
Created June 9, 2015 17:23
Kill process using grep
#!/bin/bash
kill $(ps aux | grep community.yml | awk '{print $2}')
@de314
de314 / reqParams.sh
Last active August 29, 2015 14:22
Fail bash when parameters not provided
#!/bin/bash
if [[ "$1" == "" ]] ; then
echo "First argument MUST be the jar to zip and deploy"
exit 1
fi
@de314
de314 / gen_jooq.sh
Created June 11, 2015 21:59
Generate Jooq Classes
#!/bin/bash
java -classpath jooq-3.6.1.jar:jooq-meta-3.6.1.jar:jooq-codegen-3.6.1.jar:mysql-connector-java-5.1.31-bin.jar:. org.jooq.util.GenerationTool ubnt_vnla.xml
#<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
#<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.6.0.xsd">
# <!-- Configure the database connection here -->
# <jdbc>
# <driver>com.mysql.jdbc.Driver</driver>
# <url>jdbc:mysql://localhost:3306/db_name</url>
@de314
de314 / gist:36387ca4662e737e9b5d
Created July 7, 2015 06:02
Recursive line count excluding jooq directories
find . -follow -name '*.java' -not -path "*/jooq/*" | xargs wc -l
@de314
de314 / .htaccess
Last active August 29, 2015 14:25
Http to Https Redirect and ProxyPass to 8080 in Apache
#Redirect http > https
RewriteCond %{HTTP:X-Forwarded-Proto} !^$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI}
@de314
de314 / index.html
Created August 24, 2015 18:03
A Million Times (html5 clone)
<html>
<head>
<style>
* { margin:0; padding:0; } /* to remove the top and left whitespace */
html, body { width:100%; height:100%; } /* just to be sure these are full screen*/
canvas { display:block; } /* To remove the scrollbars */
</style>
</head>
<body>
<canvas id="myCanvas"></canvas>
[alias]
ci = commit
st = status
co = checkout
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = log --oneline --graph --color --all --decorate
sub = submodule
[user]
name = <NAME>
@de314
de314 / deploy.sh
Created December 20, 2015 07:57
Maven Safe Deploy
#!/bin/bash
mvn clean test
rc=$?
if [[ $rc != 0 ]] ; then
echo 'Failing Tests';
exit $rc
fi
mvn clean deploy -DskipTests
@de314
de314 / React+Webpack Base.md
Last active August 25, 2016 06:24
React/Webpack Base

React/Webpack Base

Starer code for a react/webpack project.