Skip to content

Instantly share code, notes, and snippets.

View pawel-dubiel's full-sized avatar

Pawel Dubiel pawel-dubiel

View GitHub Profile
<link href="../paper-input/paper-input.html" rel="import">
<link href="../paper-checkbox/paper-checkbox.html" rel="import">
<link href="../paper-button/paper-button.html" rel="import">
<polymer-element name="orangecluster-loginForm">
<template>
<style>
#design_host {
position: absolute;
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
@pawel-dubiel
pawel-dubiel / gist:4520928
Created January 12, 2013 23:01
Fixed time step + rk4 integration
// from http://mndlss.com/2011/05/rk4-in-javascript/
/** EXAMPLE SETUP
**************************************************/
var ball = document.getElementById("ball")
, container = document.getElementById("cont")
, halfWidth = container.clientWidth / 2
, halfHeight = container.clientHeight / 2
, mouseUp = true
;
container.style.background = "rgb(185,195,159)";
@pawel-dubiel
pawel-dubiel / gist:4434040
Created January 2, 2013 11:48
impactjs parallax plugin
/* jerev - 10/2012 - parallax.js
Be sure to require plugins.parallax, and place this file in lib/plugins/
Parallax usage
p = new Parallax();
p.add('path/to/image.ext', {distance: 1, y: 0})
p.add('path/to/other/image.ext', {distance: 5, y: 0})
p.move(speed);
<?php
/**
* print_r converter - convert print_r() to php variable code
*
* Author: hakre <hakre.wordpress.com>
* Copyright (c) 2011, some rights reserved
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
double t = 0.0;
const double dt = 0.01;
double currentTime = hires_time_in_seconds();
double accumulator = 0.0;
State previous;
State current;
while ( !quit )
@pawel-dubiel
pawel-dubiel / twitter-oauth.js
Created December 10, 2012 04:02 — forked from santosh79/twitter-oauth.js
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('util');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY'];
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET'];
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", process.env['TWITTER_CONSUMER_KEY'], process.env['TWITTER_CONSUMER_SECRET']);
@pawel-dubiel
pawel-dubiel / server.js
Created December 10, 2012 04:01 — forked from jeffrafter/server.js
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('sys');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY";
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET";
function consumer() {
@pawel-dubiel
pawel-dubiel / robot.js
Created December 6, 2012 00:37 — forked from Shipow/robot.js
Shipow#001
var Robot = function(robot) {
robot.rotateCannon(-90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead();
//i'll add a clone but i need to refactor collision
//robot.clone();
};
@pawel-dubiel
pawel-dubiel / robot.js
Created December 5, 2012 15:57 — forked from rolemos/robot.js
RoLemosRobot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();