Skip to content

Instantly share code, notes, and snippets.

View masterojitos's full-sized avatar

Ricardo Garcia masterojitos

View GitHub Profile
@masterojitos
masterojitos / .prettierrc
Created August 3, 2020 15:39
Prettier Configuration to TypeScript
{
"printWidth": 80,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"trailingComma": "all",
"bracketSpacing": true,
"overrides": [
{
@masterojitos
masterojitos / Angular VSCode Extensions
Last active August 4, 2020 02:38
Visual Studio Code Extensions for Angular Developers
Angular Language Service
Angular Snippets (Version 9)
Angular 8 Snippets - TypeScript, Html, Angular Material, ngRx, RxJS & Flex Layout
Angular 2 TypeScript Emmet
angular2-inline
TypeScript Hero
JavaScript (ES6) code snippets
Sass
Prettier - Code formatter
TSLint
var request = require('request');
var VisualRecognitionV3 = require('watson-developer-cloud/visual-recognition/v3');
var AlchemyLanguageV1 = require('watson-developer-cloud/alchemy-language/v1');
var fs = require('fs');
var async = require('async');
var visual_recognition = new VisualRecognitionV3({
api_key: '46a5514b1d61c8bd341e176dc3212aec61346786',
version_date: '2016-09-14'
});
@masterojitos
masterojitos / prime_numbers.js
Last active August 27, 2015 06:58
Get N Prime Numbers
var i, quantity, new_prime = 5, counter = 2, prime_numbers = [];
quantity = 10;
if (quantity > 0) {
prime_numbers.push(2);
}
if (quantity > 1) {
prime_numbers.push(3);
}
if (quantity > 2) {
while (counter < quantity) {
@masterojitos
masterojitos / getRUCinfo
Last active August 29, 2015 14:04
GET RUC INFO
<?php
//ACA DEBEMOS CAMBIAR EL NÚMERO DE RUC Y LISTO
$ruc = '10470730060';
$sunat = file_get_contents('http://www.sunat.gob.pe/w/wapS01Alias?ruc='.$ruc);
$busqueda = '<card title="Resultado" id="frstcard">';
$existe = strpos($sunat, $busqueda);
if($existe === false){
echo "El RUC ingresado no existe.";
} else {
@masterojitos
masterojitos / DatabaseUpdateCommand.php
Created October 11, 2013 19:39
Command Symfony: Re-build database and loading the fixtures.
<?php
namespace Blim\MainBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class DatabaseUpdateCommand extends ContainerAwareCommand
@masterojitos
masterojitos / MO_Image.class.php
Created July 10, 2013 18:23
Clase que permite trabajar con imagenes. Redimensionar, Cortar, Agregar bordes, cambiar el fondo de la imagen, transparencias, autorellenar la imagen y sobre todo, una funcion especial para generar un perfecta minuatura de imagen.
<?php
/**
* This is a class that allows you to resize and crop an image.
* It also has the ability to add borders, background color, transparency,
* autofill and additionally generate a perfect thumbnail.
*
* @author Ricardo Garcia Rodriguez <master.ojitos@gmail.com>
* @version 1.0 - 03-20-2013
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
<?php
namespace CollDev\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Entity\User as BaseUser;
/**
* User
*
git clone ssh://git@github.com:JoeRobles/uno.git
cd uno
php bin/vendors install
sudo chmod 777 app/console
php bin/vendors install
nano app/config/parameters.ini.dist
php bin/vendors install
sudo setfacl -R -m u:www-data:rwx -m u:joebuntu:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:joebuntu:rwx app/cache app/logs
mkdir src/Uno/UnoBundle/Resources/private