Skip to content

Instantly share code, notes, and snippets.

View Elshaman's full-sized avatar
💭
Working in JAVA JAKARTA

Cristian Buitrago Elshaman

💭
Working in JAVA JAKARTA
  • SENA(Servicio Nacional de Aprendizaje), Colombia
  • Bogotá, D.C
View GitHub Profile
@Elshaman
Elshaman / arreglo.js
Created October 5, 2021 18:30
Modern Javascript looping through content: Classic for
const juegos = ['Assasins Creed ', 'GTA', 'Streets of Rage', 'AOE', 'BattleField'];
export default juegos;
@Elshaman
Elshaman / index.html
Created December 30, 2020 13:46
React with CDN Dependences .. in a single js file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Cargat React -->
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<title>Document</title>
@Elshaman
Elshaman / ajax_axios_async_await.js
Created October 19, 2020 12:25
asynchronous api request(Chapter 17): nodejs´s request using "Axios" , with async awiat model
/**
* Cristian Buitrago´s Weather API
* 17th Iteration
* Sample with "axios" nodejs
* Execute: nodejs
* Architectural style: async await
* method: GET
* Calls openweathermap's API(openweathermap.com/current for info)
*/
@Elshaman
Elshaman / ajax_needle_async_await.js
Created October 18, 2020 21:12
asynchronous api request(Chapter 17): nodejs´s request using "needle" , with async await
/**
* Cristian Buitrago´s Weather API
* 17th Iteration
* Sample with "needle" in nodejs, with async await model
* Execute: browser
* Architectural style: Async await
* method: GET
* Calls openweathermap's API(openweathermap.com/current for info)
*/
@Elshaman
Elshaman / ajax_needle_promises.js
Created October 13, 2020 14:01
asynchronous api request(Chapter 16): nodejs´s request using "needle" library , with promises
/**
* Cristian Buitrago´s Weather API
* 16th Iteration
* Sample with "needle" with promises
* Execute: nodejs
* Architectural style: Promises
* method: GET
* Calls openweathermap's API(openweathermap.com/current for info)
*/
@Elshaman
Elshaman / City.php
Created October 8, 2020 20:18
Laravel: Cascade Select with models and jquery
<?php
//city model
class City extends Eloquent{
protected $table="city";
protected $primaryKey="city_id";
public $timestamps = true;
@Elshaman
Elshaman / index.html
Created October 8, 2020 20:05
Laravel: autocomplete with jquery ui
<style>
$(document).ready(function () {
$.getJSON('paises', function (result) {
var data = $(result).map(function () {
return {value: this.country, id: this.country_id};
}).get();
$('#name').autocomplete({
@Elshaman
Elshaman / datepicker.js
Created October 8, 2020 20:02
jquery ui datepicker with correct format date
$(document).ready(function() {
$( "#inicio" ).datepicker({
"dateFormat":"yy-mm-dd"
});
});
@Elshaman
Elshaman / table-to-csv.sql
Created October 8, 2020 19:51
migrate table to csv
SELECT *
FROM departamentos
INTO OUTFILE 'c://users/asuspc/desktop/departamentos.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
@Elshaman
Elshaman / ajax_XMLHttp_web_async_await_end.js
Created October 5, 2020 16:09
asynchronous api request(Chapter 15): request using Classic XMLHttpRequest , returning an Promise Object but Async... with error handling
/**
* Cristian Buitrago´s Weather API
* 15th Iteration
* Sample with Classic, old School´s XMLHttpRequest Promised Object, but Async Await model: Error Handling
* Execute: browser
* Architectural style: Async Await
* method: GET
* Calls openweathermap's API(openweathermap.com/current for info)
*/