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 / unique_word_insensitive_case.php
Last active January 20, 2019 07:13
Return unique string array with insensitive case and merge with array value count
<?php
$array1 = array(
0 => Green,
1 => green,
3 => Yellow,
5 => yellow,
);
$array2 = array(
@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);
@NayrMorales
NayrMorales / Using Twitter API Premium with PHP.md
Last active November 16, 2018 12:24
Twitter API Premium wit PHP

This script require the following depedencies via composer

{ "require": { "abraham/twitteroauth": "^0.9.2", } }

PHP version that currently use is 7.2