Skip to content

Instantly share code, notes, and snippets.

View schwindy's full-sized avatar

Robert Mariano Schwindaman schwindy

View GitHub Profile
@schwindy
schwindy / __width.css
Created February 4, 2021 23:33
Me in like 2015 🐒
.width_0
{
width: 0% !important;
}
.width_0i
{
width: 0% !important;
}
yum install autoconf -y
yum install bison -y
yum install hiredis hiredis-devel -y
yum install libasan -y
yum install libxml2-devel
cd ~
git clone https://github.com/php/php-src
cd ./php-src
git checkout PHP-7.1.0RC3
@schwindy
schwindy / __curl.php
Created March 16, 2017 12:53
PHP Curl Library
<?php
function app_curl_exec($ch, $args=[])
{
$debug = empty($args['debug'])?false:true;
if($debug)
{
curl_setopt($ch, CURLOPT_VERBOSE, true);
$verbose = fopen('php://temp', 'rw+');
@schwindy
schwindy / api.js
Created February 17, 2017 20:06
NodeJS RESTful API Router Library
/*
@Name: REST API Router/Controller
@Purpose: Manage RESTful API Requests using a unified and organized workflow.
@Author: Robert Mariano Schwindaman (git: schwindy)
@Note: API Methods are created by exporting a new method in this file (see exports.kek() below for reference). All API
Methods should return a JSON Object with the same schema as the object shown in this example. This JSON Object is
analyzed by exports._receive() and then sent via exports._send(). A Router should be implemented and pointed at the
desired API endpoints.
<?php
/** Search/Paginate a MySQL Table
* @important: All search columns ($args['fields']) are required to be FULLTEXT Indexes. Alter Table Schema if required.
*
* @param: array $args - Arguments
* @required:
* * table_name:string - The name of the MySQL Table we should search
*
* @optional:
* * class_name:string - The name of the Class that represents $args['table_name'] (defaults to "BaseClass")
var acl = 'user';
$(function()
{
if(empty(localStorage.cart))localStorage.cart = JSON.stringify({});
if(location.href.indexOf('/dealers/') > -1)acl = 'dealers';
attach_clicks();
});
function add_to_cart(id, amount)
<?php
function CopyProfile($args=[])
{
if(empty($args['profile_name']))
{
new JobResponse(0, __FUNCTION__, "Missing Parameter: profile_name | args: ".json_encode($args));
return false;
}
.border_0
{
border: 0;
}
.border
{
border: 1px solid rgba(0, 0, 0, 0.22);
}
@media (max-width:1900px)
{
.media_1900_width_0{width:0} .media_1900_width_0i{width:0 !important}
.media_1900_width_5{width:5%} .media_1900_width_5i{width:5% !important}
.media_1900_width_10{width:10%}.media_1900_width_10i{width:10% !important}
.media_1900_width_15{width:15%}.media_1900_width_15i{width:15% !important}
.media_1900_width_20{width:20%}.media_1900_width_20i{width:20% !important}
.media_1900_width_25{width:25%}.media_1900_width_25i{width:25% !important}
.media_1900_width_30{width:30%}.media_1900_width_30i{width:30% !important}
.media_1900_width_35{width:35%}.media_1900_width_35i{width:35% !important}
<?php
function convert_to($from, $volume, $to)
{
if($from == $to || $volume == 0)return (float)$volume;
$xmarket = Database::getInstance()->get_row
(
"SELECT
last,