Skip to content

Instantly share code, notes, and snippets.

View lacnak's full-sized avatar

Jan Lacnak lacnak

  • jan lacnak kd
  • germany
View GitHub Profile
/** @jsx React.DOM */
var SVGComponent = React.createClass({
render: function() {
return this.transferPropsTo(
<svg>{this.props.children}</svg>
);
}
});
@pburtchaell
pburtchaell / styles.css
Last active February 12, 2025 08:45
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* 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/
*/
@roboter
roboter / cnc3axis.ino
Created March 23, 2014 12:25
3Axis CNC
#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
//------------------------------------------------------------------------------
@kcranley1
kcranley1 / PiBot_Firmware_Alpha
Last active October 4, 2016 17:50
My (working) version of James Torbett's early alpha release.
//
// PiBot arduino code - PiBot_Firmware_Alpha
// James Torbett 2014
// v. 0.1
// EARLY ALPHA RELEASE
//
// Todo:
// ADC implementation
// Temperature (thermistor)
// Voltages
@col
col / servo_test.ino
Created December 29, 2013 13:18
A simple Arduino sketch that allows you to control a brushless motor via an ESC (or any servo really) using inputs from the Arduino IDE serial monitor.
#include <Servo.h>
Servo esc;
int escPin = 9;
int minPulseRate = 1000;
int maxPulseRate = 2000;
int throttleChangeDelay = 100;
void setup() {
@Shelob9
Shelob9 / 1-pods-loop-general-example.php
Last active April 9, 2025 15:01
Pods Looping Examples.
<?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 ) {
@ktnr74
ktnr74 / install_adb_platform_tools.sh
Last active December 3, 2016 16:12
Latest Android platform-tools installer for Ubuntu and Debian
#!/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}
@dergachev
dergachev / app.js
Created December 17, 2012 20:36
Manual JS prettification of enterprisewiki.co. See http://news.ycombinator.com/item?id=4933049
// 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("&dash; " + e.html()), t.append(e), e.on("click", function() {
$("body").animate({scrollTop: n}, 200)
@lorenzopolidori
lorenzopolidori / has3d.js
Last active December 4, 2020 10:52 — forked from webinista/has3d.js
Testing for CSS 3D Transforms Support
function has3d(){
if (!window.getComputedStyle) {
return false;
}
var el = document.createElement('p'),
has3d,
transforms = {
'webkitTransform':'-webkit-transform',
'OTransform':'-o-transform',
@bueltge
bueltge / set-featured-image.php
Created June 14, 2012 12:41
Set featureed image automaticly on save post/page