This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
device = navigator.userAgent.toLowerCase() | |
Mac = device.match(/(mac)/) | |
Windows = device.match(/(windows)/) | |
iPhone = device.match(/(iphone|ipod)/) | |
iPad = device.match(/(ipad)/) | |
iOS = device.match(/(iphone|ipad|ipod)/) | |
android = device.match(/(android)/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Copyright 2013 NAOTONE | |
//Please use under MIT license. | |
jQuery(window).resize(function() { | |
iOSClearFixed(); | |
}); | |
jQuery('html').on("touchend", touchHandler); | |
touchHandler = function(event) { | |
return iOSClearFixed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin at2x($image_name, $extention: '.png') | |
background: image_url($image_name + $extention) no-repeat center center | |
background-size: image-width($image_name + $extention) image-height($image_name + $extention) | |
width: image-width($image_name + $extention) | |
height: image-height($image_name + $extention) | |
display: block | |
$x2img : $image_name + '@2x' + $extention | |
@media all and (-webkit-min-device-pixel-ratio : 1.5) | |
background-image: image_url($x2img) | |
background-size: image-width($image_name + $extention) image-height($image_name + $extention) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
retinaCanvas = -> | |
if window.devicePixelRatio > 1 | |
canvas.width = W * window.devicePixelRatio | |
canvas.height = H * window.devicePixelRatio | |
ctx.scale(window.devicePixelRatio, window.devicePixelRatio) | |
else | |
canvas.width = W | |
canvas.height = H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('.content').on('mouseover', -> | |
jQuery(this).stop().css(opacity: 0.3).animate | |
opacity: 0.8 | |
, 300 | |
).on 'mouseout', -> | |
jQuery(this).stop().animate | |
opacity: 1 | |
, 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap phinze/homebrew-cask | |
update | |
install brew-cask | |
install zsh | |
install ag | |
install apple-gcc42 | |
install autoconf | |
install automake | |
install boost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//npm install --save-dev gulp gulp-watch gulp-livereload gulp-header gulp-concat gulp-coffee gulp-compass gulp-minify-css gulp-notify gulp-uglify gulp-order gulp-ruby-sass | |
var gulp = require('gulp'), | |
watch = require('gulp-watch'), | |
livereload = require('gulp-livereload'), | |
header = require('gulp-header'), | |
concat = require('gulp-concat'), | |
coffee = require('gulp-coffee'), | |
compass = require('gulp-compass'), | |
minifyCSS = require('gulp-minify-css'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apple-gcc42 | |
autoconf | |
automake | |
bison | |
boost | |
boost-build | |
boot2docker | |
brew-cask | |
cmake | |
curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Based on http://stackoverflow.com/questions/8371790/how-to-set-icon-on-file-or-directory-using-cli-on-os-x | |
# Usage | |
# cd path/to/moviesAndImagesDir/ | |
# thisFileName.sh ./ [jpg|png] | |
dirPath=$1 | |
thumbExt=$2 | |
IFS=$'\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$search_query = get_search_query(); | |
$results = $wpdb->get_results("SELECT * | |
FROM $wpdb->terms AS wt | |
INNER JOIN $wpdb->term_taxonomy AS wtt ON wt.term_id=wtt.term_id | |
INNER JOIN $wpdb->term_relationships AS wtr ON wtr.term_taxonomy_id=wtt.term_taxonomy_id | |
LEFT JOIN $wpdb->posts wp ON wp.ID=wtr.object_id | |
WHERE taxonomy='$taxonomy' AND name LIKE '%%$search_query%%' | |
" ); |
OlderNewer