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
/** @jsx React.DOM */ | |
var SVGComponent = React.createClass({ | |
render: function() { | |
return this.transferPropsTo( | |
<svg>{this.props.children}</svg> | |
); | |
} | |
}); |
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
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |
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
#include <Stepper.h> | |
const int stepsPerRevolution = 100; // change this to fit the number of steps per revolution | |
// for your motor | |
Stepper stepperX(stepsPerRevolution, 6,7,8,9); | |
Stepper stepperY(stepsPerRevolution, 2,3,4,5); | |
Stepper stepperZ(stepsPerRevolution, 10,11,12,13); | |
//------------------------------------------------------------------------------ | |
// CONSTANTS | |
//------------------------------------------------------------------------------ |
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
// | |
// PiBot arduino code - PiBot_Firmware_Alpha | |
// James Torbett 2014 | |
// v. 0.1 | |
// EARLY ALPHA RELEASE | |
// | |
// Todo: | |
// ADC implementation | |
// Temperature (thermistor) | |
// Voltages |
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
#include <Servo.h> | |
Servo esc; | |
int escPin = 9; | |
int minPulseRate = 1000; | |
int maxPulseRate = 2000; | |
int throttleChangeDelay = 100; | |
void setup() { |
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 | |
//set up pods::find parameters to limit to 5 items | |
$param = array( | |
'limit' => 5, | |
); | |
//create pods object | |
$pods = pods('pod_name', $params ); | |
//check that total values (given limit) returned is greater than zero | |
if ( $pods->total() > 0 ) { |
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/bash | |
[ -f /etc/os-release ] && . /etc/os-release | |
[ "$ID" == "debian" ] || [ "$ID" == "ubuntu" ] || exit 1 | |
[ "$HOSTTYPE" == "x86_64" ] && dpkg --add-architecture i386 2>/dev/null | |
apt-get -qqy update | |
apt-get -qqy install wget xml2 unzip | |
[ "$HOSTTYPE" == "x86_64" ] && apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386 | |
DESTDIR=${ANDROID_SDK_HOME:-$HOME/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
// https://github.com/EightMedia/hammer.js/blob/master/hammer.js | |
function toId(t) { | |
return t.toLowerCase().replace(/[^a-z]/gi, "-").replace(/-+/gi, "-") | |
} | |
function toc() { | |
var t = $("#sidebar").html(""); | |
$("h1,h2,h3").each(function() { | |
var e = $(this).clone(), n = $(this).offset().top; | |
"#" != e.html() && (e.is("h3") && e.html("‐ " + e.html()), t.append(e), e.on("click", function() { | |
$("body").animate({scrollTop: n}, 200) |
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
function has3d(){ | |
if (!window.getComputedStyle) { | |
return false; | |
} | |
var el = document.createElement('p'), | |
has3d, | |
transforms = { | |
'webkitTransform':'-webkit-transform', | |
'OTransform':'-o-transform', |
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 | |
/** | |
* Plugin Name: Set featured image | |
* Plugin URI: http://wpengineer.com/2460/set-wordpress-featured-image-automatically/ | |
* Description: Set featureed image automaticly on save post/page | |
* Version: 1.0.1 | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de | |
* License: GPLv3 | |
*/ |
NewerOlder