Skip to content

Instantly share code, notes, and snippets.

View rafaeluzzi's full-sized avatar

Uzzi rafaeluzzi

View GitHub Profile
@rafaeluzzi
rafaeluzzi / index.js
Created September 25, 2018 11:24 — forked from AlexBrasileiro/index.js
ShareYourFeedback
// inspiration: https://dribbble.com/shots/4370657-Share-Your-Feedback
import React, { Component, Fragment } from "react";
import { Animated, StyleSheet, Text, View, TouchableOpacity, Dimensions, Platform, Easing, TextInput, KeyboardAvoidingView, Image } from "react-native";
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
const { width: windowWidth } = Dimensions.get('window');
const Icon = (props) => <FontAwesome5 {...props} />
@rafaeluzzi
rafaeluzzi / basic-pubnub.php
Created May 31, 2018 05:42 — forked from krhoyt/basic-pubnub.php
Basic example of publishing to PubNub from PHP. Really distilled down to just the REST calls.
<?php
$CHANNEL = "iot";
$PUB_KEY = "_YOUR_PUBLISH_KEY_";
$SUB_KEY = "_YOUR_SUBSCRIBE_KEY_";
$SECRET_KEY = "_YOUR_SECRET_KEY_";
$PUBNUB = "http://pubsub.pubnub.com";
$data = array(
"count" => 3
export default class Api {
static headers() {
return {
Accept: "application/json",
"Content-Type": "application/json"
};
}
static get(route) {
return this.request(route, null, "GET");
@rafaeluzzi
rafaeluzzi / ajax post for extension
Created June 14, 2012 15:30
one alternative is to post to server via XMLHttpRequest
// POST the data to the server using XMLHttpRequest (AJAX)
function ajaxpost(data)
{
var req = new XMLHttpRequest();
req.open("POST", "http://compraymudate.com/admin/apipost/", true);
var params = "title=" + document.getElementById("title").value +
"&content=" + document.getElementById("content").value +
"&price=" + document.getElementById("price").value +
"&rooms=" + document.getElementById("rooms").value +
SELECT * FROM `items` WHERE UNIX_TIMESTAMP() - 2592000 >`item_date` AND `item_status` = 'publish' AND `item_feed_id` = '12'
<?php //begins feed type conditional ?>
<?php if ($item->get_feed_domain() == "tumblr.com"):?>
<?php //begins content type conditionals ?>
<?php if ($item->item_data['type'] == 'audio'):?>
<!--tumblr audio item-->
<h1><a href="<?php echo $item->get_permalink()?>"><?php echo $item->get_title()?></a></h1>
<?php echo $item->get_audio(); ?>
<?php elseif ($item->item_data['type'] == 'regular'):?>
<!--tumblr text item-->
<?php /* Hi from Puerto Rico
i am in love with sweetcron thanks yon for the toy.
i just made a nice tag cloud if anyone is intreted here it is.
this uses $popular_tags and it displays tags with greater counts
bigger in size and so on..
paste this to _sidebar.php replacing the original tag list code */ ?>
<h3>Popular Tags</h3>
<?php
function printTagCloud($tags) {
// $tags is the array