Skip to content

Instantly share code, notes, and snippets.

View lloricode's full-sized avatar
🔍
Learning something

Lloric Mayuga Garcia lloricode

🔍
Learning something
View GitHub Profile
@lloricode
lloricode / arrays.java
Created March 25, 2017 03:27
sample multi-arrays using java in console
public static void main(String[] args) {
/**
* size limit in array
*/
int user_count = 5;
int user_filed_count = 4;
/**
* user_identification
@lloricode
lloricode / MY_Controller.php
Created April 21, 2017 17:08 — forked from iEdzar/MY_Controller.php
https://github.com/lloricode/ci-capstone/tree/a35913562223d00239215bf9b06d473dc1e118db header scrollable conflicts before this commit in dynamic table bootstap: $this->table_bootstrap for ci_capstone
<?php
class CI_Capstone_Controller extends MY_Controller
{
/**
*
* @param array $header header
* @param array $table_data_rows rows
* @param string $table_config table bootstrap
* @param string $caption_lang caption
@lloricode
lloricode / multi_array_joptionpane.java
Created May 13, 2017 04:56
sample edit view in java multi-array wtih JOptionPane
public static void main(String[] args) {
final int maximum_users = 2, maximum_columns = 4;
final int name_index = 0, address_index = 1, age_index = 2, contact_index = 3;
final String name_label = "Name: ", address_label = "Address: ", age_label = "Age: ", contact_label = "Contact: ";
final String enter_label = "Enter ";
String student_array[][] = new String[maximum_users][maximum_columns];
for (int i = 0; i < maximum_users; i++) {
@lloricode
lloricode / .env.travis
Created July 6, 2017 12:23 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@lloricode
lloricode / .env
Created July 6, 2017 14:55
Unit test Laravel 5 packages in context with Travis CI (with MySQL testing database)
APP_ENV=testing
APP_DEBUG=true
APP_KEY=RMme3vqJUaNAxVi5kq33xBgRAxmp7yXU
DB_HOST=localhost
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD=
CACHE_DRIVER=array
@lloricode
lloricode / mersenneNumberGenerator.php
Created August 7, 2017 16:39 — forked from markheramis/mersenneNumberGenerator.php
Generate the first 12 Mersenne Number Generator
<?php
$count = 12;
for($i=1; $i < $count; $i++){
print( pow(2,$i) - 1) . ' | ';
}
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
wget https://xdebug.org/files/xdebug-2.5.5.tgz
tar xvzf xdebug-2.5.5.tgz
cd xdebug-2.5.5
phpize
@lloricode
lloricode / Schedulable.php
Created March 10, 2018 19:25 — forked from davidpiesse/Schedulable.php
Laravel Custom Class/Model Scheduling
<?php
//Don't forget to change the namespace!
namespace App\Traits;
use Cron\CronExpression;
use Illuminate\Support\Carbon;
use Illuminate\Console\Scheduling\ManagesFrequencies;
trait Schedulable{
@lloricode
lloricode / document_types.rb
Created August 16, 2018 03:03 — forked from acuppy/document_types.rb
All major document mime types (Microsoft Office, Apple iWork, Adobe PDF) as a Ruby Module
module DocumentFileTypes
module Microsoft
WORD = %w(
application/msword
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.openxmlformats-officedocument.wordprocessingml.template
application/vnd.ms-word.document.macroEnabled.12
application/vnd.ms-word.template.macroEnabled.12
)
@lloricode
lloricode / gist:72f12bfffb0eaa9ec2c9ec3665874ed3
Created September 2, 2018 11:57 — forked from plasticbrain/gist:3887245
PHP: mime types (array format)
<?php
$mime_types = array(
'.3dm' => 'x-world/x-3dmf',
'.3dmf' => 'x-world/x-3dmf',
'.a' => 'application/octet-stream',
'.aab' => 'application/x-authorware-bin',
'.aam' => 'application/x-authorware-map',
'.aas' => 'application/x-authorware-seg',
'.abc' => 'text/vnd.abc',
'.acgi' => 'text/html',