Skip to content

Instantly share code, notes, and snippets.

View masterfermin02's full-sized avatar
🌎
Hello world!

Fermin Perdomo masterfermin02

🌎
Hello world!
View GitHub Profile
/*
* @param1 = string
* return boolean
*/
function isUniqueCharater(str){
return str.length === new Set(str).size;
}
/*
#include <stdio.h>
int main(void) {
// your code goes here
/* local variable definition */
int arrlenth;
int *list;
int minvalue;
int maxvalue;
<?php
function writeLog($log, $file = 'log.txt')
{
$fp = fopen($file, 'a+');
fwrite($fp, $log."\n");
fclose($fp);
}
@masterfermin02
masterfermin02 / http_requests_helper.php
Created May 12, 2017 18:39
Http request help for php
<?php
function httpRequest($url)
{
// make request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST,TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded; charset=UTF-8",));
@masterfermin02
masterfermin02 / print.php
Last active August 23, 2017 21:10
Imprime en una impresora matricial
<?php
// open a file on the pc
$handle = fopen("data", "w");
// if(($handle = @fopen("lpt1", "w")) === FALSE){
// die('No se puedo Imprimir, Verifique su conexion con el Terminal');
//}
fwrite($handle,chr(27). chr(64));//reinicio
//fwrite($handle, chr(27). chr(112). chr(48));//ABRIR EL CAJON
<?php
$data = json_decode('[
{
"id": 1,
"value1": 5,
"value2": 10
},
{
@masterfermin02
masterfermin02 / app.js
Created November 9, 2017 14:37 — forked from datchley/app.js
"Getting Functional with Javascript" Blog post source files
/**
* Primary application logic for our Functional Programming blog example
* See related blog series at: http://www.datchley.name/tag/functional-programming/
* Version: 2.0
*/
// A simple, resuable comparison for '>='
function greaterThanOrEqual(a, b) {
return a >= b
}
@masterfermin02
masterfermin02 / functional.php
Last active November 10, 2017 18:51
"Getting Functional with PHP"
<?php
/**
* This is a implementantion in PHP of primary application logic for our Functional Programming blog example
* See related blog series at: http://www.datchley.name/tag/functional-programming/
* Version: 2.0
*/
// Access the `obj` using the property `prop`
function get_prop($obj, $prop)
{
if ( is_callable( $prop ) ) {
@masterfermin02
masterfermin02 / functional.php
Last active December 22, 2017 21:51
Usando programacion funcional en php
<?php
/**
* This is a implementantion in PHP of primary application logic for our Functional Programming blog example
* See related blog series at: https://masterfermin02.wordpress.com/tag/functional-programming/
* Version: 1.0
*/
// Access the `obj` using the property `prop`
function get_prop($obj, $prop)
{
if ( is_callable( $prop ) ) {
# Template for a VirtualHost with SSL
# Note: to use the template, rename it to /etc/apache2/vhost.d/yourvhost.conf.
# Files must have the .conf suffix to be loaded.
#
# See /usr/share/doc/packages/apache2/README.QUICKSTART for further hints
# about virtual hosts.
# NameVirtualHost statements should be added to /etc/apache2/listen.conf.
#