Skip to content

Instantly share code, notes, and snippets.

View desbest's full-sized avatar

desbest desbest

View GitHub Profile
@desbest
desbest / breadcrumbs.css
Created May 17, 2015 18:42
Dynamic drive block breadcrumbs
/***********
Breadcrumbs
http://css-tricks.com/triangle-breadcrumbs/
*/
.breadcrumb {
list-style: none;
overflow: hidden;
font-size: 0.8em;
}
.breadcrumb li {
@desbest
desbest / gist:2f75a58cc8b9f86c84c5ff7b8945f2b4
Created December 5, 2016 15:00
Rounders 4 Blogger Theme
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><$BlogPageTitle$></title>
<$BlogMetaData$>
@desbest
desbest / dabblet.css
Created October 10, 2017 22:49
Untitled
#container
{
margin: 0 auto;
width: 600px;
background:#fff;
}
#header
{
background:#ccc;
@desbest
desbest / stopforumspam.php
Last active October 14, 2017 14:53
Stop Forum Spam (block abusive ip addresses and emails from signing up)
<?php
function get_web_page($url, $cookiesIn = '')
{
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => true, //return headers in addition to content
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_ENCODING => "", // handle all encodings
CURLOPT_AUTOREFERER => true, // set referer on redirect
CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
@desbest
desbest / preview.md
Last active October 19, 2017 13:58
Different ways of displaying errors in validation

text errors

visual errors

@desbest
desbest / default tumblr theme.html
Created November 26, 2017 11:33
Default Tumblr Theme
<!DOCTYPE html>
<!--[if IE 8]><html class="lt-ie10 lt-ie9"> <![endif]-->
<!--[if IE 9]><html class="lt-ie10"> <![endif]-->
<!--[if gt IE 9]><!--> <html> <!--<![endif]-->
<head>
{MobileAppHeaders}
<meta charset="utf-8">
<title>{Title}{block:SearchPage} ({lang:Search results for SearchQuery}){/block:SearchPage}{block:PermalinkPage}{block:PostSummary} — {PostSummary}{/block:PostSummary}{/block:PermalinkPage}</title>
{block:Description}
<meta name="description" content="{MetaDescription}">
@desbest
desbest / casey changelog.txt
Last active December 30, 2017 16:54
Casey changelog
Casey
http://desbest.com/casey
05/08/2011 - Creation of Casey
xx/xx/2014 - Further Updates
20/12/2017 - Use bcrypt for storing passwords instead of md5
- Use header() when logging in instead of meta refresh
- Show error message when image fails to upload
- Fixed errors in installer
- Fixed mistakes in chmod instructions in installer
@desbest
desbest / autopagination.js
Last active May 6, 2018 15:24
Auto Pagination
////////javascript libraries used
//// jquery
//// scrollPagination
//// aeImageResize
//// masonry
var offset = 0;
$('#stuffhere').scrollPagination({
'contentPage': 'themes/[var.theme]/ajaxcontrols.php?page=products&offset='+offset, // the page where you are searching for results
'contentData': {}, // you can pass the children().size() to know where is the pagination
@desbest
desbest / s3link-v4.php
Created April 9, 2022 10:07 — forked from kelvinmo/s3link-v4.php
PHP code to generate a pre-signed URL to access a restricted AWS S3 object