Skip to content

Instantly share code, notes, and snippets.

@kruxor
kruxor / return_class_name.php
Last active October 22, 2018 03:41
return the class name php class example
class myclass {
function myfunction() {
return get_class($this);
}
}
@kruxor
kruxor / slick-dots-circles.css
Created May 3, 2017 00:24
Slick slider dots show a circle instead of a dot
.slick-dots li.slick-active button:before, .slick-dots li button:before {
color: #FFF;
opacity: 1;
font-size: 16px;
}
.slick-dots li.slick-active button {
border: 5px solid #00AC9F;
border-radius: 100%;
}
.slick-dots li.slick-active button:before {
@kruxor
kruxor / link.class.php
Created February 29, 2016 03:35
link class php
@kruxor
kruxor / Load content into a div with javascript.markdown
Created November 6, 2015 03:00
Load content into a div with javascript
@kruxor
kruxor / Load content into a div with jQuery.markdown
Created November 6, 2015 02:54
Load content into a div with jQuery
@kruxor
kruxor / numbers_only.php
Created August 17, 2015 04:27
Only include numbers in a string
<?php
$str = "123fghy567";
$str = preg_replace('/\D/', '', $str);
?>
@kruxor
kruxor / loop_through_post.php
Created August 16, 2015 03:35
Loop through post array checking that the method is post, using key and values.
<?php
if($_SERVER['REQUEST_METHOD']=="POST") {
$message = "";
foreach( $_POST as $stuff => $stuff_val ) {
if( is_array( $stuff ) ) {
foreach( $stuff as $thing => $thing_val) {
$message .= "$thing : $thing_val <br>";
}
} else {
$message .= "$stuff : $stuff_val <br>";
@kruxor
kruxor / Loop through divs with the same class name and append something.markdown
Created July 14, 2015 00:44
Loop through divs with the same class name and append something

Loop through divs with the same class name and append something

Pretty much the title, good id you have a ton of the same divs and you need to append a common link or something.

A Pen by Luke on CodePen.

License.

@kruxor
kruxor / Custom-Mini-HTML5-Basic-Grid-System.markdown
Last active August 29, 2015 14:15
Custom Mini HTML5 Basic Grid System

Custom Mini HTML5 Basic Grid System

a basic HTML5 Mobile Friendly Grid System

A Pen by Luke on CodePen.

License.

@kruxor
kruxor / Sticky-Footer-HTML-+-CSS.markdown
Created February 3, 2015 23:02
Sticky Footer HTML + CSS