Skip to content

Instantly share code, notes, and snippets.

View kcclemo's full-sized avatar

Kirk Clemons kcclemo

  • Chief Architect Software
  • Rathdrum, ID
View GitHub Profile
@kcclemo
kcclemo / csv_to_array.php
Created November 10, 2020 15:37 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
function munge($address)
{
$address = strtolower($address);
$coded = "";
$unmixedkey = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.@";
$inprogresskey = $unmixedkey;
$mixedkey="";
$unshuffled = strlen($unmixedkey);
for ($i = 0; $i <= strlen($unmixedkey); $i++) {
@kcclemo
kcclemo / build-gallery.php
Last active September 10, 2018 15:10
Break an array into incremental chunks.
@kcclemo
kcclemo / debug.css
Last active December 7, 2018 19:35
Some CSS rules that apply borders to everything on the page so that the box model can be seen visually.
/*! debug.css | MIT License | zaydek.github.com/debug.css */
*:not(path):not(g) {
color: hsla(210, 100%, 100%, 0.9) !important;
background: hsla(210, 100%, 50%, 0.5) !important;
outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important;
box-shadow: none !important;
}
var pauseState = true;
// On before slide change
slider.on('afterChange', function(event, slick, currentSlide, nextSlide){
//check the length of total items in .gallery container
//if that number is the same with the number of the last slider
//Then pause the slider
if( item_length === slider.slick('slickCurrentSlide') ){
$('#pause-btn').toggle();
$('#play-btn').toggle();
$('.gallery').slick('slickPause');
<html>
<head>
<style>
body {
padding: 0;
}
/* Alert */

Keybase proof

I hereby claim:

  • I am kcclemo on github.
  • I am kcclemo (https://keybase.io/kcclemo) on keybase.
  • I have a public key ASCi4VW_6wDeEhOfYH4ynJTREvigSk2XMbZh-B0vHFpduQo

To claim this, I am signing this object:

@kcclemo
kcclemo / highlight-anchor.html
Created April 24, 2017 14:17
Highlight element based on anchor(StackOverflow Effect)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Highlight element based on URL hash example</title>
<style>
/*
Custom class to be applied to our element.