Skip to content

Instantly share code, notes, and snippets.

View lanche86's full-sized avatar

Milan Ivanovic lanche86

View GitHub Profile
@lanche86
lanche86 / index.html
Created June 13, 2013 20:29
A CodePen by Marcelo Aguila. Twitter Card UI - A twitter profile card to embed in websites i guess, is following the idea of my twitter client UI http://codepen.io/marceloag/pen/fDmtq
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Twitter Card</title>
<link rel="stylesheet" href="css/estilos.css">
<link href='http://fonts.googleapis.com/css?family=Quicksand:300,400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:400,300' rel='stylesheet' type='text/css'>
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css" rel="stylesheet">
</head>
@lanche86
lanche86 / index.html
Created June 13, 2013 20:23
A CodePen by Stephen Burgess. Sexy Social Buttons - CSS only animation effect on hover of these simple but fun social buttons.
<a href="http://twitter.com/minimalmonkey" class="icon-button twitter"><i class="icon-twitter"></i><span></span></a>
<a href="http://facebook.com" class="icon-button facebook"><i class="icon-facebook"></i><span></span></a>
<a href="http://plus.google.com" class="icon-button google-plus"><i class="icon-google-plus"></i><span></span></a>
@lanche86
lanche86 / index.html
Created June 13, 2013 20:21
A CodePen by Adam Storr. N64 Logo in CSS - I decided my first experiment with 3D in CSS would be recreating the classic N64 I'm so fond of.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>N64 Logo</title>
<meta name="description" content="">
<meta name="author" content="">
@lanche86
lanche86 / Magento: Show static block
Created May 31, 2013 11:25
Magento: Show static block
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('name_of_static_block')->toHtml(); ?>
@lanche86
lanche86 / WordPress, fourth post, different classname
Last active December 17, 2015 16:49
WordPress, while print posts, every fourth has different classname
<?php while ( have_posts() ) : the_post(); ?>
<?php
if ($i % 4 == 3 ) $classname = 'large';
else $classname = 'small';
?>
<div class="program-<?php echo $classname; ?>">
<?php the_post_thumbnail( "program-size-$classname", array( "class" => "program-size" ) ); ?>
<h3><?php the_title(); ?></h3>
<p><?php the_content(); ?></p>
<?php $i++; ?>
@lanche86
lanche86 / WordPress, Database tables prefix change
Created March 10, 2013 11:32
WordPress: Change the prefix of your database tables
// Change the prefix of your database tables
// If your old $table_prefix was wp_test_ and your new one is wp_, you need this query:
UPDATE `wp_usermeta` SET `meta_key` = replace(`meta_key`, 'wp_test_', 'wp_');
UPDATE `wp_options` SET `option_name` = replace(`option_name`, 'wp_test_', 'wp_');
@lanche86
lanche86 / migrate-wp.php
Created February 15, 2013 22:21
migrate-wp.php
<?php
if ( $_POST ) {
$newsiteurl = $_POST['newsiteurl'];
// If last char in URL is "/" -> remove it
if ( substr( $newsiteurl, -1) == "/" ) {
$newsiteurl = substr($newsiteurl, 0, -1);
}