Skip to content

Instantly share code, notes, and snippets.

View daigofuji's full-sized avatar

Daigo Fujiwara daigofuji

View GitHub Profile
@daigofuji
daigofuji / SassMeister-input.scss
Created May 4, 2014 11:00
Generated by SassMeister.com.
// ----
// Sass (v3.3.6)
// Compass (v1.0.0.alpha.18)
// ----
$primary-color: #f00;
@mixin set-color($color) {
color: $color !important;
&.inverted {
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
fonts_dir = "fonts"
# You can select your preferred output style here (can be overridden via the command line):
output_style = :compact
@daigofuji
daigofuji / simple-3d-card-flip.html
Last active December 18, 2015 12:28
Simple 3d card flip
<!DOCTYPE html>
<html>
<head>
<title>simple3d</title>
<style type="text/css" title="text/css">
.sandbox-wrap {
-webkit-perspective: 800px;
-moz-perspective: 800px;
-o-perspective: 800px;
perspective: 800px;
@daigofuji
daigofuji / WP custom login
Last active December 18, 2015 08:00
Customizing wordpress "login screen." Add this to wp-content/themes/YOUR_THEME_FOLDER/functions.php
// Custom login page. Modifying logo image, link and title.
function my_custom_login_logo() {
echo '<style type="text/css"> h1 a { background-image:url('.get_stylesheet_directory_uri().'/img/MYLOGO.png) !important; }</style>';
}
add_action('login_head', 'my_custom_login_logo');
function namespace_login_headerurl( $url ) {
$url = get_bloginfo( 'url' );
return $url;
}
@daigofuji
daigofuji / AutoYear.html
Created March 16, 2013 02:30
Too lazy updating curent year for the copyright at the bottom of the page? So am I.
<p>Copyright &copy; <script type="text/javascript">var d = new Date();document.write(d.getFullYear());</script></p>
@daigofuji
daigofuji / Responsive-CSS3-animation.html
Created January 22, 2013 20:35
CSS3 animation simplified. Wanted to deconstruct http://bradfrost.github.com/this-is-responsive/
<!DOCTYPE html>
<html>
<head>
<title>Responsive CSS3 animation. Look! No JavaScript!</title>
<style type="text/css" title="text/css">
<!--
html, body {
margin: 0; padding: 0; height:100%; /* in order for height 100% to work, you need to set html and body to match. then you need to use iframe to add it to the html */
font-family: "Century Gothic", "Tw Cen MT", Futura, "URW Gothic L", Arial, sans-serif;
}
@daigofuji
daigofuji / gist:3364434
Created August 15, 2012 22:52
Number format
function number_format (number, decimals, dec_point, thousands_sep) {
// https://raw.github.com/kvz/phpjs/master/functions/strings/number_format.js
// Strip all characters but numerical ones.
number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
var n = !isFinite(+number) ? 0 : +number,
prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,
dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
s = '',
toFixedFix = function (n, prec) {
@daigofuji
daigofuji / gist:3196205
Created July 29, 2012 05:12
Bootstrap select
select {
margin: 0;
vertical-align: middle;
font-weight: normal;
display: inline-block;
width: 210px;
height: 18px;
padding: 4px;
margin-bottom: 9px;
font-size: 13px;