Skip to content

Instantly share code, notes, and snippets.

@ocean90
ocean90 / box-shadow.html
Last active June 20, 2024 08:19
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@rodneyrehm
rodneyrehm / datauri.php
Created November 17, 2011 09:12
PHP: datauri.php - convert image to data-uri
#!/opt/local/bin/php
<?php
/*
1) replace the shebang (first line) with the path to your php binary
(probably something like /usr/bin/php)
2) move the file to /usr/local/bin/datauri.php
(this should be in your PATH)
3) chmod ugo+rx /usr/local/bin/datauri.php
(make the script executable for everyone)
@schmidt1024
schmidt1024 / template-snippets.txt
Last active December 14, 2021 19:52
Template Snippets for Joomla!
# all php files :: disallow direct access of file
# between <?php and ?>
defined('_JEXEC') or die;
# index.php :: define variable with application
# between <?php and ?>
$app = JFactory::getApplication();
# index.php :: define variable with document
# between <?php and ?>
@ScottPhillips
ScottPhillips / cache-json.php
Created July 18, 2012 23:52
Cache Remote JSON Feed
<?php
/**
* API Request Caching
*
* Use server-side caching to store API request's as JSON at a set
* interval, rather than each pageload.
*
* @arg Argument description and usage info
*/
@menzerath
menzerath / backup.php
Last active February 18, 2024 19:33
PHP: Recursively Backup Files & Folders to ZIP-File
<?php
/*
* PHP: Recursively Backup Files & Folders to ZIP-File
* MIT-License - 2012-2018 Marvin Menzerath
*/
// Make sure the script can handle large folders/files
ini_set('max_execution_time', 600);
ini_set('memory_limit', '1024M');
@gregrickaby
gregrickaby / custom.css
Last active December 28, 2020 16:48
CSS markup to make Tiny Tiny RSS look a bit more like Google Reader. Paste this into the Custom CSS box inside "Preferences".
/* Reset
------------------------------------------------------------ */
body#ttrssMain,
body#ttrssPrefs,
body#ttrssLogin,
body {
color: #000;
font-family: "Arial", sans-serif;
font-size: 100%; /* Set to default browser size, 16px */
line-height: 1.5;
@yckart
yckart / jquery.addrule.js
Last active December 29, 2022 12:16
Add css-rules to an existing stylesheet - http://stackoverflow.com/a/16507264/1250044
/*!
* jquery.addrule.js 0.0.2 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/11/23
**/
@eteubert
eteubert / feeds_unique.txt
Created July 12, 2013 18:10
List of Podcast RSS Feeds, extracted via iTunes API
This file has been truncated, but you can view the full file.
<http://sailortalk.podOmatic.com/rss2.xml>
HTTP://www.knient.com/CAL/CAL-Podcast/CAL-Podcast.xml
Http://feeds.feedburner.com/fridgeandhbomb
Http://feeds.feedburner.com/wfodicks
Http://ravenc-taouf.podomatic.com/rss2.xml
Http://www.calvaryonline.org/podcasts/podcast.xml
Http://www.changkhui.com/XML/teemateepai.xml
httP://dtfreunde.podcaster.de/Deutsches_Theater.rss
http://-myantioch.sermon.tv/rss/main
http://004.podOmatic.com/rss2.xml
@luisnomad
luisnomad / BookMarklet Get YouTube poster image.html
Last active June 11, 2022 12:46
Get the current YouTube video's poster image (highest resolution available) with this simple Bookmarklet
<a href ="javascript:(function()%7Bfunction%20getParameterByName(name)%20%7Bname%20%3D%20name.replace(%2F%5B%5C%5B%5D%2F%2C%20%22%5C%5C%5B%22).replace(%2F%5B%5C%5D%5D%2F%2C%20%22%5C%5C%5D%22)%3Bvar%20regex%20%3D%20new%20RegExp(%22%5B%5C%5C%3F%26%5D%22%20%2B%20name%20%2B%20%22%3D(%5B%5E%26%23%5D*)%22)%2Cresults%20%3D%20regex.exec(location.search)%3Breturn%20results%20%3D%3D%20null%20%3F%20%22%22%20%3A%20decodeURIComponent(results%5B1%5D.replace(%2F%5C%2B%2Fg%2C%20%22%20%22))%3B%7Dvar%20id%20%3D%20getParameterByName%20(%22v%22)%3Bif%20(typeof%20id%20!%3D%3D%20null%20%26%26%20id%20!%3D%3D%22%22)%20%7Bvar%20url%20%3D%20%22http%3A%2F%2Fimg.youtube.com%2Fvi%2F%22%20%2B%20id%20%2B%20%22%2Fmaxresdefault.jpg%22%3Bwindow.open(url%2C'_blank')%3B%7D%20else%20%7Balert%20(%22Activate%20the%20tab%20in%20your%20browser%20where%20the%20YouTube%20video%20is%20loaded%20and%20try%20again!%22)%3B%7D%7D)()">Grab Poster Image</a>
@litzinger
litzinger / cleaner.php
Created December 3, 2014 22:34
htmlpurifier example
<?php
/*
HTMLPurifier settings example
'cleaner_xss_clean' => 'no',
'cleaner_html_clean' => 'no',
'cleaner_allow_tags_in_post' => '',
'cleaner_allow_attr_in_template' => 'href, class, src, rel, width, height',
'cleaner_allow_tags_in_template' => 'img, h1, h2, h3, h4, h5, blockquote, strong, em, p, b, a, i, ul, li, ol, br',
*/