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
SELECT SUM(count) AS views | |
FROM wp_post_views | |
WHERE id IN (10738) | |
AND type = 4 |
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
class SenditsController < ApplicationController | |
before_action :set_sendit, only: [:show, :edit, :update, :destroy] | |
def new | |
@sendit = Sendit.new | |
@sendit.alarm = "Even Triggered" | |
@sendit.save | |
respond_to do |format| | |
if @sendit.save |
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
a = "name" | |
puts a |
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
<center> | |
<img id="cc_strinfo_trackimageurl_puresoun" class="cc_streaminfo" /> <br/> | |
<p id="cc_strinfo_song_puresoun" class="cc_streaminfo" style="color:white;"></p> | |
<div style ="width:150px; height:20px; background-color:rgb(41, 171, 226); border-radius:30px; color:white; margin-bottom:5px;"><h4>LISTEN LIVE</h4></div> | |
<image src="http://psmgradio.com/wp-content/uploads/2015/01/equalizer.gif" style="margin:0px 10px 30px 0px;"> | |
<audio id="radiostream" controls="controls" width="300" height="20"><source src="http://usa2.fastcast4u.com:3066/;" type="audio/mpeg" /></audio> | |
</center> |
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
Consumer Key: ck_4e9abf226a70740e7d05210485d09736 | |
Consumer Secret: cs_bd8a53adb5c7c416e05708e137bb1d8c |
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
When I conduct an HTTP POST to mydomain.com/api/orders.json?token=mytoken with this body message: | |
{ | |
"order": { | |
"line_items": [ | |
{ "variant_id": 1, "quantity": 5 } | |
] | |
} | |
} |
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: WP REST API Multisite | |
* Plugin URI: https://github.com/epfl-lts2/json-rest-api-multisites/ | |
* Description: Very simple site endpoint for WP REST API | |
* Version: 0.1 | |
* Author: Maximilien Cuony | |
* Author URI: https://github.com/the-glu | |
* License: MIT | |
* */ |
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 json_rest_api_multisites_api_init() { | |
global $json_rest_api_multisites_api_site; | |
$json_rest_api_multisites_api_site = new JsonRESTAPIMultiSites_API_Site(); | |
add_filter('json_endpoints', array($json_rest_api_multisites_api_site, 'register_routes')); | |
} | |
add_action( 'wp_json_server_before_serve', 'json_rest_api_multisites_api_init'); | |
class JsonRESTAPIMultiSites_API_Site { |
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 json_rest_api_multisites_api_init() { | |
global $json_rest_api_multisites_api_site; | |
$json_rest_api_multisites_api_site = new JsonRESTAPIMultiSites_API_Site(); | |
add_filter('json_endpoints', array($json_rest_api_multisites_api_site, 'register_routes')); | |
} | |
add_action( 'wp_json_server_before_serve', 'json_rest_api_multisites_api_init'); | |
class JsonRESTAPIMultiSites_API_Site { |
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
.controller('LoginCtrl', function($scope, $state) { | |
$scope.data = {}; | |
$scope.signupEmail = function(){ | |
//Create a new user on Pasre | |
var user = new Parse.User(); | |
user.set("username", $scope.data.username); | |
user.set("password", $scope.data.password); | |
user.set("email", $scope.data.email); | |