Skip to content

Instantly share code, notes, and snippets.

View NayrMorales's full-sized avatar
Make Coffe Great Again

Ryan AR Liem NayrMorales

Make Coffe Great Again
View GitHub Profile
@NayrMorales
NayrMorales / BlogController.php
Created November 28, 2018 01:58 — forked from tobysteward/BlogController.php
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@NayrMorales
NayrMorales / Category.php
Created November 26, 2018 03:46 — forked from varunon9/Category.php
Implementing Naive Bayes Classification algorithm into PHP to classify given text as ham or spam. To see complete project visit: https://github.com/varunon9/naive-bayes-classifier
<?php
class Category {
public static $HAM = 'ham';
public static $SPAM = 'spam';
}
?>
@NayrMorales
NayrMorales / twitter_oauth_curl.php
Created November 22, 2018 02:41 — forked from m13z/twitter_oauth_curl.php
Super simple PHP twitter oauth request without user context (https://dev.twitter.com/docs/auth/application-only-auth)
/*
* using curl
*/
$key = 'YOUR_KEY_HERE';
$secret = 'YOUR_SECRET_HERE';
$api_endpoint = 'https://api.twitter.com/1.1/users/show.json?screen_name=marcosfernandez'; // endpoint must support "Application-only authentication"
// request token
$basic_credentials = base64_encode($key.':'.$secret);