Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

I'm Luis! ^-^ Zerquix18

🎯
Focusing
View GitHub Profile
@Zerquix18
Zerquix18 / setup.sh
Created Oct 28, 2020
trabajo final proyecto II
View setup.sh
#!/bin/bash
apt-get update -y
apt install git npm nginx mysql-server -y
npm install -g forever
mysql -u root -e "CREATE USER 'unicaribe'@'localhost' IDENTIFIED BY 'lajevatuya'"
mysql -u root -e "GRANT ALL PRIVILEGES ON * . * TO 'unicaribe'@'localhost';"
mysql -u root -e 'FLUSH PRIVILEGES'
@Zerquix18
Zerquix18 / update.vtl
Created Mar 14, 2019
AWS AppSync resolver template to dynamically put stuff in a DynamoDB
View update.vtl
{
"version" : "2017-02-28",
"operation" : "UpdateItem",
"key" : {
"id" : { "S" : "${ctx.args.id}" }
},
#set( $expNames = {} )
#set( $expValues = {} )
#set( $expSet = {} )
@Zerquix18
Zerquix18 / fizzbuzz.php
Created Dec 15, 2017
Shortest PHP Fizzbuzz
View fizzbuzz.php
<?php
for($i=0;$i<1e2;)echo((++$i%3?'':'Fizz').($i%5?'':'Buzz')?:$i),"\n";
View leertexto.php
<?php
echo 'Programa para leer texto y procesar informacion de ella', "\n";
echo '-------------------------------------------------------', "\n";
$vocales =
$consonantes =
$numeros =
$caracteres =
$lista =
$resultados = [];
echo 'Introduzca el destino del texto:', "\n";
View class-uploadFile.php
<?php
class uploadFile {
public $filename;
private $filepath = './';
public $fullpath;
@Zerquix18
Zerquix18 / dec.php
Created Dec 17, 2014
Con este código puedes sacar la generatriz de un decimal, es decir, la fracción que genera como resultado aquel decimal :)
View dec.php
<?php
function simplificar($up, $down) {
echo "¿Trato de simplificar? [s|y]\n";
if( ! in_array( strtolower( trim( $x = fgets(STDIN) ) ), array("yes", "y", "s", "si", "sí", "yh") )
&& !($x == "\n") )
exit("Entendido.\n");
$result = array(0 => array("u" => (int) $up, "d" => (int) $down) );
$i = 0;
echo "Intentando simplificar...\n";
while(true) {
@Zerquix18
Zerquix18 / syntax.php
Created Jun 11, 2014
Playing with PHP syntax — This is me when I'm bored...
View syntax.php
<?php
$lol = "lol";
define("HAHA", $lol, 1);
class ja {
function jaja() {
return 'This will be the result';
}
}
class nose {
function lol(){