Skip to content

Instantly share code, notes, and snippets.

View stevepm's full-sized avatar
🏠
Working from home

Steve stevepm

🏠
Working from home
View GitHub Profile
@stevepm
stevepm / designer.html
Last active August 29, 2015 14:11
designer
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
if (process.env.IS_MIRROR) {
Meteor.methods({
'loadFixtures': function(){
console.log('Loading default fixtures');
// TODO: add your fixtures here
// Example below:
//*****EXAMPLE********
//Accounts.createUser({
// email: 'email@example.com',
// password: '123456'
@stevepm
stevepm / gist:1756809
Created February 7, 2012 02:47
java hw
import java.util.Scanner;
public class Driver {
private int age, carValue, tickets;
Scanner in;
public Driver(){
this.in = new Scanner(System.in);
@stevepm
stevepm / gist:1771209
Created February 8, 2012 17:13
scrape
<?php
error_reporting(E_ERROR | E_PARSE);
$dom = new DOMDocument();
$dom->loadHTMLFile('http://www.xbox360achievements.org/games/retail/');
$xml = simplexml_import_dom($dom);
$links = $xml->xpath('//table/tr/td/a');
for($i=30;$i<count($links);$i++):
?>
<a target="_blank" href="http://www.xbox360achievements.org/games/retail/<?php echo $links[$i]['href']; ?>"><?php echo $links[$i]['href']; ?></a><br/>
<?php
<?php
include("simple_html_dom.php");
// Create DOM from URL or file
$html = file_get_html('http://www.google.com/');
// Find all images
/*foreach($html->find('img') as $element)
echo $element->src . '<br>';
// Find all links
<?php
/**
* Created by JetBrains PhpStorm.
* User: mint
* Date: 9/4/13
* Time: 1:41 AM
* To change this template use File | Settings | File Templates.
*/
echo "hello";
@stevepm
stevepm / introrx.md
Created March 27, 2016 07:10 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
module Optimizely
module Helpers
module Constants
JSON_SCHEMA = {
'type' => 'object',
'properties' => {
'projectId' => {
'type' => 'string'
},
'accountId' => {
@stevepm
stevepm / optimizely.rb
Last active November 10, 2016 19:53
datafile.json
{"experiments"=>
[{"status"=>"Paused",
"percentageIncluded"=>10000,
"key"=>"split",
"trafficAllocation"=>[{"entityId"=>"6235610089", "endOfRange"=>10000}],
"audienceIds"=>[],
"variations"=>[{"id"=>"6235610089", "key"=>"original"}],
"forcedVariations"=>{},
"id"=>"6239920018"},
{"status"=>"Paused",

Keybase proof

I hereby claim:

  • I am stevepm on github.
  • I am magel (https://keybase.io/magel) on keybase.
  • I have a public key ASAY63FjUZV5kzVtQqTe83GRl_-lkOAhIOkjX-cOxLjuZAo

To claim this, I am signing this object: