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 {
@daigofuji
daigofuji / SassMeister-input.scss
Created May 18, 2014 22:03
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
@function grid-calc($colNumber, $totalColumns) {
@return percentage(($colNumber / $totalColumns));
}
.stream-image-right {
@daigofuji
daigofuji / _padding-margin.scss
Last active August 29, 2015 14:03
OOCSS _padding-margin.scss (From @kianoshp)
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
/**************** padding and margin settings *****************
Setting padding and margins to be added to different sections
This sections contains individual setting and also a mixin
to be able to add to different sections
@daigofuji
daigofuji / index.html
Created July 29, 2014 03:25
Barebone index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.3.1/css/foundation.min.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
</head>
<body>
@daigofuji
daigofuji / mario.js
Last active August 29, 2015 14:13
ScriptCraft drone plugin, create 8-bit Mario
var Drone = require('../drone').Drone;
var blocks = require('blocks');
/************************************************************************
### Drone.mario() method
Creates an 8-bit mario, 12 blocks wide and 16 blocks high, made out of wool.
#### Parameters
@daigofuji
daigofuji / invader.js
Created January 7, 2015 21:51
ScriptCraft drone plugin for space invader 8-bit art
var Drone = require('../drone').Drone;
var blocks = require('blocks');
/************************************************************************
### Drone.invader() method
Creates an 8-bit space invader, 11 blocks wide and 8 blocks high,
made out of black wool, unless otherwise specified.
#### Parameters
@daigofuji
daigofuji / read_Yahoo_pipes.php
Created April 12, 2012 17:01
Get Pipes jason and process it using php
$yahooPipesURL = "http://pipes.yahoo.com/pipes/pipe.run?_id=89dba5fe8716d4e780a80206edda2da6&_render=json";
// the old way
//$session = curl_init($yahooPipesURL);
//curl_setopt($session, CURLOPT_HEADER, false);
//curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
//$resultsJson = curl_exec($session);
//curl_close($session);
// the new way
@daigofuji
daigofuji / gist:2966774
Created June 21, 2012 16:12
PHP LANGUAGE DETECTION
<?php
/*
PHP LANGUAGE DETECTION SCRIPT
written by Mischa Szeker (www.szeker.ch)
January 21, 2011
http://www.szeker.net/2011/02/10/php-language-detection-script/
*/
/* Setting variables */
@daigofuji
daigofuji / gist:3168075
Created July 24, 2012 04:39
Quick tool tip (State of Rivalry)
<style>
#tooltip { padding: 5px; width: auto; min-width:78px; background-color:#fff; border: 2px #ccc solid; position: absolute; top: 50px; z-index:1000; font-size:12px; text-transform:uppercase; text-align:left; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;}
#tooltip .tip, #tooltip .tip-inner { position: absolute; width:0; height:0; border-top-width: 0; background: none; }
#tooltip .tip { border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid #ccc; top: -7px; right: auto; left: 50%; margin-left: -5px; }
#tooltip .tip-inner { border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #fff; bottom: auto; top: 2px; left: -4px; }
</style>
<script>
$(".game").hover( function () {
$("#tip-wpit").text($(this).attr("data-wpit"));
$("#tip-lpit").text($(this).attr("data-lpit"));
@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;