Skip to content

Instantly share code, notes, and snippets.

View evild70's full-sized avatar
🏍️
BRRAAAAP

Dennis Lahay evild70

🏍️
BRRAAAAP
  • Minneapolis, MN
  • 11:04 (UTC -05:00)
View GitHub Profile
@evild70
evild70 / index.html
Last active February 7, 2023 17:12
YouTube embed with custom thumbnail
<div class="youtube-container">
<h2>With custom image</h2>
<div class="youtube-player" data-id="NsUWXo8M7UA" data-thumbnail="https://images.unsplash.com/photo-1574158622682-e40e69881006?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80"></div>
</div>
<div class="youtube-container">
<h2>With Youtube Thumbnail</h2>
<div class="youtube-player" data-id="NsUWXo8M7UA"></div>
</div>
@evild70
evild70 / vue.config.js
Created February 6, 2021 17:10
Vue config file
// Vue CLI uses http-proxy-middleware (https://github.com/chimurai/http-proxy-middleware#options)
// These are the options that worked for me. YMMV.
module.exports = {
devServer: {
port: 1337,
proxy: {
'^/': {
target: 'https://api.igdb.com/v4',
ws: true,
changeOrigin: true
@evild70
evild70 / .eslintrc
Last active October 17, 2019 18:50
.eslintrc for Vue CLI + Prettier
module.exports = {
root: true,
env: {
node: true,
es6: true,
browser: true
},
extends: ['plugin:vue/essential', 'eslint:recommended'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
@evild70
evild70 / .bash_profile
Created July 15, 2019 19:26
.bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
#source ~/.profile
# Set Paths
# ------------------------------------------------------------
#export PATH="$PATH:/usr/local/bin/"
#export PATH="/usr/local/git/bin:/sw/bin/:/usr/local/bin:/usr/local/:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
#export PATH=$PATH:/Users/dlahay/drush
#export PATH=$HOME/local/bin:$PATH
@evild70
evild70 / App.vue
Last active October 8, 2019 15:47
Accessing IGDB.com API v3 with Vue CLI 3/axios using a proxy to avoid CORS issues
<template>
<div id="app"></div>
</template>
<script>
import axios from 'axios';
export default {
mounted() {
axios({
@evild70
evild70 / .editorconfig
Last active February 6, 2021 17:08
Default .editorconfig
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
@evild70
evild70 / istouchdevice.js
Last active October 8, 2019 15:48
isTouchDevice - Determine if device has touch capabilities.
var isTouchDevice = false;
if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) {
isTouchDevice = true;
}
var deviceAgent = navigator.userAgent.toLowerCase();
isTouchDevice = (deviceAgent.match(/(iphone|ipod|ipad)/) || deviceAgent.match(/(android)/) || deviceAgent.match(/(iemobile)/) || deviceAgent.match(/iphone/i) || deviceAgent.match(/ipad/i) || deviceAgent.match(/ipod/i) || deviceAgent.match(/blackberry/i) || deviceAgent.match(/bada/i));
// Saw in Modernizr issues thread about the old Modernizr.touch check
@evild70
evild70 / CSS Custom Checkboxes and Radio Buttons.markdown
Created July 10, 2015 13:21
CSS Custom Checkboxes and Radio Buttons
@evild70
evild70 / scrollToElement.js
Last active June 6, 2016 19:03
scrollToElement
// https://github.com/kswedberg/jquery-smooth-scroll
// http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bugs.html
scrollToElement: function(id) {
// $('a[href*=#]').each(function() {
// if ($(this.hash).length) {
// $(this).click(function(event) {
var targetOffset = $(id).offset().top;
// event.preventDefault();
var labels = [];
var times = function(n) {
return Array.apply(null, new Array(n));
};
var data = times(100).map(function(val, index) {
labels.push(index + 1);
// val = Math.round(Math.random() * 100);
val = Math.floor(Math.random() * (100 - 70 + 1)) + 70;
return val;