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 / .zshrc
Last active April 17, 2020 20:16
# Start with
# - https://medium.com/swlh/power-up-your-terminal-using-oh-my-zsh-iterm2-c5a03f73a9fb
# $ brew install zsh-autosuggestions
# $ brew install zsh-syntax-highlighting
# - https://sourabhbajaj.com/mac-setup/iTerm/zsh.html
# - https://github.com/AdoptOpenJDK/homebrew-openjdk
# - https://apple.stackexchange.com/a/293988
export TERM="xterm-256color"
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
@de314
de314 / build.gradle
Last active November 9, 2017 13:32
Spring Boot Npm Build Script
task buildClient(type: Exec) {
executable "sh"
args "-c", "cd src/main/www && npm run publish"
}
build.dependsOn buildClient
@de314
de314 / data.json
Created November 1, 2017 21:03
Data
========================= CATEGORIES WITH LEAST VENDORS =========================
[
{
"title": "IT Financial Management Tools",
"reviews": 3,
"vendors": 1,
"rpv": 3
},
{
"title": "Managed Mobility Services, Worldwide",
@de314
de314 / store.js
Last active October 18, 2017 01:43
Init Redux
import { createStore, applyMiddleware, compose } from 'redux';
import persistState from 'redux-localstorage'
import createSagaMiddleware from 'redux-saga'
import rootReducer from './state'
// https://redux-saga.js.org/
import rootSaga from './sagas'
const sagaMiddleware = createSagaMiddleware()
const middleware = [sagaMiddleware]
@de314
de314 / tmp.sql
Created August 23, 2017 02:39
SQL HEX
SELECT
LOWER(CONCAT(
SUBSTR(HEX(user_id), 1, 8), '-',
SUBSTR(HEX(user_id), 9, 4), '-',
SUBSTR(HEX(user_id), 13, 4), '-',
SUBSTR(HEX(user_id), 17, 4), '-',
SUBSTR(HEX(user_id), 21)
)) as userId
FROM user
WHERE company_id = unhex(replace('9c00fd3e-cd10-4797-8fb8-2fb433690ea6','-',''));
@de314
de314 / embedScript.js
Created June 22, 2017 13:24
Chrome Extension XSS
alert('Hello, World!');
console.log({
$: $,
chrome: chrome,
extension: chrome.extension
});
// this call requires session (or OAuth) authentication
// It MUST be run within the actual webpage's scope, not from the extensions scope
// =====
// This will succeed because this scope is being injected into the pages JS scope
@de314
de314 / Snippets.coffee
Last active October 25, 2017 15:01
Atom React Snippets
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
@de314
de314 / install.sh
Last active October 18, 2017 01:46
Base React Redux
#!/bin/bash
npm i -S lodash react-router-dom recompose moment redux react-redux redux-localstorage redux-saga react-select [email protected] axios
npm i -S redux-saga axios
npm i -S jquery react-bootstrap react-ace
@de314
de314 / CorsConfig.java
Created March 9, 2017 17:47
Spring Boot Cors Filter
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Profile;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;