Skip to content

Instantly share code, notes, and snippets.

@musicalbigfoot
musicalbigfoot / gist:8469434
Created January 17, 2014 06:49
CSS: Animation
@-webkit-keyframes animationname {
0% { opacity: 0; }
50% { opacity: 1; }
100% { opacity: 0; }
}
@-moz-keyframes animationname {
0% { opacity: 0; }
50% { opacity: 1; }
100% { opacity: 0; }
}
@musicalbigfoot
musicalbigfoot / gist:8469276
Created January 17, 2014 06:28
CSS: background-size: cover
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
@musicalbigfoot
musicalbigfoot / gist:8469049
Created January 17, 2014 05:59
CSS: Transition (short)
-webkit-transition: all .5s ease-in-out;
-ms-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
@musicalbigfoot
musicalbigfoot / gist:8215903
Created January 2, 2014 07:07
CSS: :after clear
:after {
content: "";
display: block;
clear: both;
}
@musicalbigfoot
musicalbigfoot / gist:8215899
Created January 2, 2014 07:07
css: clear :before
:before {
content: "";
display: block;
clear: both;
}
$loggedin_user = Auth::instance()->get_user();
@musicalbigfoot
musicalbigfoot / gist:6056973
Created July 22, 2013 19:43
CSS: Background Size - Cover
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
@musicalbigfoot
musicalbigfoot / gist:5754533
Created June 11, 2013 04:51
PHP: CSV Migration
<?php
$csv = new CSVFile('export.csv');
$return = Array();
$i = 0;
foreach ($csv as $line)
{
$return[$i] = $line;
$i++;
@musicalbigfoot
musicalbigfoot / MainActivity.java
Created June 9, 2013 00:13
Only inflate view if it doesnt exist
if (rootView != null) {
ViewGroup parent = (ViewGroup) rootView.getParent();
if (parent != null)
parent.removeView(rootView);
}
try {
rootView = inflater.inflate(tabLayout, container, false);
} catch (InflateException e) {
/* view is already there, just return view as it is */
}
@musicalbigfoot
musicalbigfoot / gist:5605976
Created May 18, 2013 22:32
XML: Holo Colors
<resources>
<color name="Tombstone">#4C4C4C</color>
<color name="Charcoal">#3C3C3D</color>
<color name="AlmostBlack">#303030</color>
<color name="BlueLight">#33b5e5</color>
<color name="BlueDark">#0099cc</color>
<color name="BlueBright">#00ddff</color>
<color name="PurpleLight">#AA66CC</color>