Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Randy Glenn Aguirre ChaosPower

💭
I may be slow to respond.
View GitHub Profile
@ChaosPower
ChaosPower / build.gradle
Created Feb 29, 2020
Android ABI Split
View build.gradle
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a', 'armeabi', 'arm64-v8a', 'x86_64'
universalApk false
}
}
ext.abiCodes = ['armeabi-v7a': 1, x86: 2, armeabi: 3, 'arm64-v8a': 4, 'x86_64': 5]
@ChaosPower
ChaosPower / Eval.php
Last active Feb 26, 2020
PHP CLI Script
View Eval.php
<?php
$options = getopt('f:', ['file:']);
if ($options['file'] != '') {
require_once $options['file'];
$oracle = new oracle(); // Files with same class name instance.
if (!property_exists($oracle, 'fields')) {
View eval.php
<?php
$options = getopt('f:', ['file:']);
if ($options['file'] != '') {
require_once $options['file'];
$oracle = new oracle();
@ChaosPower
ChaosPower / axios_cancel.js
Created Sep 25, 2019
Javascript: Cancel Duplicate Axios calls.
View axios_cancel.js
let pending = []; // declares an array for storing the cancellation function and Axios identifier for each request
let cancelToken = axios.CancelToken;
let removePending = (config) => {
let xUrl = config.url.split('/');
let yUrl = '';
if(xUrl.length > 3) {
xUrl.pop(); // silently remove last Index;
yUrl = xUrl.join('/');
@ChaosPower
ChaosPower / webpack.mix.js
Created May 24, 2017
Laravel 5.4: Webpack: Custom SSL Certificate and Key for Browsersync Laravel Mix
View webpack.mix.js
const { mix } = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
@ChaosPower
ChaosPower / makeDirSample
Created Nov 9, 2016
Linux Commands | mkdir - multiple
View makeDirSample
mkdir -p {blah1,blah2,blah3}/{fish,cheese}
@ChaosPower
ChaosPower / SailsJS Sails-OracleDB Installation
Last active Aug 29, 2015
SAILSJS:: SAILS-ORACLE: Ubuntu Server 14.10 LTS
View SailsJS Sails-OracleDB Installation
Complete Requirements
From https://github.com/joeferner/node-oracle
Run environment checking
"source pre_install_check.sh"
When "everythings looks dandy" appears
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/c3/0.3.0/c3.min.css">
</head>
<body>
<div id="d-chart"></div>
@ChaosPower
ChaosPower / variableAsFunction.php
Created Jul 24, 2014
PHP: Variable as function
View variableAsFunction.php
<?php
function call($f)
{
return $f();
}
function sample()
{
return 'sample called';
@ChaosPower
ChaosPower / MatrixGen.php
Created Feb 13, 2014
PHP: Vertical Matrix Example
View MatrixGen.php
<?php
/**
*
* Utility class for matrix vertical data
*
* @author ChaosPower
* @license WTFPL
*
*/
You can’t perform that action at this time.