Skip to content

Instantly share code, notes, and snippets.

View fotan's full-sized avatar

Matt Danskine fotan

View GitHub Profile
@fotan
fotan / INSTRUCTIONS.txt
Last active July 5, 2016 23:45
Google XML Sitemap Generator (Python)
Instructions:
Edit the config.xml file to match your site and server. There are clear instructions all the way through the file, but for the basic settings all you need is the server path and domain to your web site and the name of your index file.
Upload the files to your server (/sitemap folder) and set up the CRON.
Script will create /sitemap.xml file and tell Google, Bing and Yahoo about it.
Run from CRON:
@fotan
fotan / style.css
Last active April 26, 2016 02:47
BS3 - Carousel Fade Effect
/* Overwrites stock transition with CSS3 fade */
.carousel .item {
-webkit-transition: opacity 3s; /* Adjust timing */
-moz-transition: opacity 3s;
-ms-transition: opacity 3s;
-o-transition: opacity 3s;
transition: opacity 3s;
}
.carousel .active.left {
left:0;opacity:0;z-index:2;
@fotan
fotan / page.php
Created April 19, 2016 15:10
Anonymous Email Page
<?php
if(isset($_GET['submitted']) && $_GET['submitted'] == "y") {
// Email the message
$head = "MIME-Version: 1.0\r\n";
$head .= "Content-type: text/html; charset=Windows-1251\r\n";
$head .= "From: \r\n";
$to = "somebody@email.com";
$subject ="";
$body = $_GET['email_text'];
@fotan
fotan / text shadow.css
Created March 30, 2016 15:06
SCSS - Text Shadow
/// Text Shadow
/// @param {Size} $x [2px] - X
/// @param {Size} $y [2px] - Y
/// @param {Size} $blur [2px] - Blur
/// @param {Color} $color [rgba(0,0,0,.4)] - Color
@mixin text-shadow($x: 2px, $y: 2px, $blur: 5px, $color: rgba(0,0,0,.4)) {
text-shadow: $x $y $blur $color;
}
@fotan
fotan / emboss.css
Created March 30, 2016 14:52
SCSS - Emboss Text
/// Embossing text shadow
/// @access public
/// @param {Float} $value - Opacity value
/// @example scss - Usage
/// .foo {
/// @include text-shadow(0.5);
/// }
/// @example css - Result
/// .foo {
/// text-shadow: rgba(255, 255, 255, 0.5) 0 1px 0;
@fotan
fotan / white opacity.css
Created March 30, 2016 14:51
SCSS - White with Opacity
/// Generates the color white, with, optionally, a set opacity.
/// @access public
/// @param {Float} $opacity - Opacity
/// @example scss - Usage
/// .foo {
/// border-color: white(0.1);
/// }
/// @example css - Result
/// .foo {
/// border-color: rgba(255, 255, 255, 0.1);
@fotan
fotan / black opacity.css
Created March 30, 2016 14:51
SCSS - Black with Opacity
/// Generates the color black, with, optionally, a set opacity.
/// @access public
/// @param {Float} $opacity - Opacity
/// @example scss - Usage
/// .foo {
/// border-color: black(0.1);
/// }
/// @example css - Result
/// .foo {
/// border-color: rgba(0, 0, 0, 0.1);
@fotan
fotan / opacity.css
Created March 30, 2016 14:50
SCSS - Opacity
/// Given an opacity value, generates that value as well as a way to display that opacity value in Internet Explorer 8 and 9.
/// @access public
/// @param {Float} $opacity - Opacity
/// @example scss - Usage
/// .foo {
/// @include opacity(0.5);
/// }
/// @example css - Result
/// .foo {
/// opacity: 0.5;
@fotan
fotan / radius.css
Created March 30, 2016 14:47
SCSS - Corner Radiuses
/// Separated border-radius helpers
/// @access public
/// @param {Length} $top-left-radius - Top left radius
/// @param {Length} $top-right-radius - Top right radius
/// @param {Length} $bottom-right-radius - Bottom right radius
/// @param {Length} $bottom-left-radius - Bottom left radius
/// @example scss - Usage
/// .foo {
/// @include border-radius-separate(1px, 2px, 3px, 4px);
/// }
@fotan
fotan / bg_gradient.css
Created March 30, 2016 14:44
SCSS - Background Gradient Mixin
/// Background gradient helper
/// @access public
/// @param {Color} $start-color - Start color
/// @param {Color} $end-color - End color
/// @param {String} $orientation - Type of gradient, either `vertical`, `horizontal` or `radial`
/// @example scss - Usage
/// .foo {
/// @include background-gradient(red, black, 'vertical');
/// }
/// @example css - Result