Skip to content

Instantly share code, notes, and snippets.

@shoxty
shoxty / google weather condition
Created April 6, 2011 16:33
Get the weather condition from googles weather api
<?php
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=[LOCATION]');
$information = $xml->xpath("/xml_api_reply/weather/current_conditions/condition");
echo $information[0]->attributes();
@shoxty
shoxty / Center a widthless element
Created April 6, 2011 16:42
Center a widthless element with CSS
<style type="text/css">
.center-wrapper {overflow: hidden; width: 500px;} //SET THE WIDTH OF YOUR CONTAINER
.center-wrapper .center-wrapper-inner {position: relative; float: left; left: 50%;}
.center-wrapper .center-wrapper-inner .centered-item {float: left; position: relative; right: 50%;}
</style>
<div class="center-wrapper">
<div class="center-wrapper-inner">
<div class="centered-item">
CRAP IN HERE WILL BE CENTERED
require(['jquery', 'backbone'], function($, Backbone) {
Reddit = Backbone.Model.extend({
initialize: function(){
console.log("oh snap! my name is "+this.get('name'));
}
});
var test = new Reddit({name: "test"});
var test2 = new Reddit({name: "test 2"});
@shoxty
shoxty / gist:3990315
Created October 31, 2012 22:15
Chat log with Oracle Technical Support for Taleo
I have a lot of questions regarding the Taleo Business Edition Web Services API. Can you please put me in
contact with somebody that can help me?
Here are a few of the questions:
1) Is there a way to retrieve a list of all the form fields that are required for a requisition including
any custom fields that may have been added?
2) In what order should I made the calls to your services to properly submit a candidate to a requisition?
3) I am currently able to submit generic details of a candidate and attach it to a requisition but how can
I submit employment history, education, references, certifications and upload a resume? Do you have separate
<?php
class CsvToJson {
private $feed = '';
private $data = array();
public function __construct($feed) {
$this->feed = $feed;
}
@shoxty
shoxty / gist:e2cfe43cf41f6d6e9769
Created January 25, 2015 20:36
sample twitter results
[
{
"username": "therock",
"bio": "The official Instagram account for Dwayne 'The Rock' Johnson",
"website": "http://twitter.com/TheRock",
"profile_picture": "https://instagramimages-a.akamaihd.net/profiles/profile_232192182_75sq_1381267437.jpg",
"full_name": "therock",
"id": "232192182"
},
{