Skip to content

Instantly share code, notes, and snippets.

View IsaacGonzalez's full-sized avatar

Isaac González IsaacGonzalez

View GitHub Profile
private async databaseIdMapping(request: Request, response: Response): Promise<void> {
try {
const urn: string = Utils.makeSafeUrn(request.params.urn || '');
const guid: string = request.params.guid || (request.query.guid as string) || null;
const region: string = request.query.region as string || Forge.DerivativesApi.RegionEnum.US;
const reverse: boolean = (request.query.reverse as string) === 'true'; // defaults to false
const dbBuffers: Svf2PropertiesCache = await this.utils.get(urn, guid, region);
if (!dbBuffers)
return (response.status(404).end());
@IsaacGonzalez
IsaacGonzalez / index.html.erb
Last active May 12, 2021 02:58
app/views/persona_recomendacions/
<p id="notice"><%= notice %></p>
<h1>Persona Recomendacions</h1>
<table>
<thead>
<tr>
<th>Persona</th>
<th>Recomendacion</th>
<th colspan="3"></th>
<%= form_with(model: recomendacion) do |form| %>
<% if recomendacion.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(recomendacion.errors.count, "error") %> prohibited this recomendacion from being saved:</h2>
<ul>
<% recomendacion.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
@IsaacGonzalez
IsaacGonzalez / .vimrc
Created March 11, 2017 01:59
Mi configuracion de VI
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=700
" Enable filetype plugins
filetype plugin on
filetype indent on
@IsaacGonzalez
IsaacGonzalez / ArduinoMotorPosiciones.ino
Created October 19, 2015 03:28
Código para hacer que un motor de impresora se mueva a las 5 posiciones establecidas mediante un arduino y una serie de push buttons.
#include <NewPing.h>
#define TRIGGER_PIN 8
#define ECHO_PIN 9
#define MAX_DISTANCE 200
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
const int pin_boton_1 = 2;
const int pin_boton_2 = 3;
//@Test
public void testSuccesfulSPEIPMCreate() throws Exception {
valid_payment_method = new JSONObject(
"{'description':'Stogies',"
+ "'reference_id':'9839-wolf_pack',"
+ "'amount':20000,"
+ "'currency':'MXN',"
+ "'details':"
+ "{"
<?php
// localhost/multipart_tet
var $response = array();
// Agarramos el archivo
var $foto = $_FILES["file"]
// Vemos cuales headers son los que están llegando
public class Test{
private void Button_Click(object sender, RoutedEventArgs e){
Empleado empleadoABorrar = null;
for(var empleado in lista1){
if(empleado.getNombre().Equals(this.t1.Text))
empleadoABorrar = empleado;
}
if(typeof YUI!="undefined"){YUI._YUI=YUI}var YUI=function(){var c=0,f=this,b=arguments,a=b.length,e=function(h,g){return(h&&h.hasOwnProperty&&(h instanceof g))},d=(typeof YUI_config!=="undefined")&&YUI_config;if(!(e(f,YUI))){f=new YUI()}else{f._init();if(YUI.GlobalConfig){f.applyConfig(YUI.GlobalConfig)}if(d){f.applyConfig(d)}if(!a){f._setup()}}if(a){for(;c<a;c++){f.applyConfig(b[c])}f._setup()}f.instanceOf=e;return f};(function(){var q,b,r="patched-v3.11.0",i=".",o="http://yui.yahooapis.com/",u="yui3-js-enabled",d="yui3-css-stamp",m=function(){},h=Array.prototype.slice,s={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},g=(typeof window!="undefined"),f=(g)?window:null,w=(g)?f.document:null,e=w&&w.documentElement,a=e&&e.className,c={},j=new Date().getTime(),n=function(A,z,y,x){if(A&&A.addEventListener){A.addEventListener(z,y,x)}else{if(A&&A.attachEvent){A.attachEvent("on"+z,y)}}},v=function(B,A,z,x){if(B&&B.removeEventListener){try{B.removeEventListener(A,z,x)}catch(y){}}else{if(B&&B.detachEvent){B.de
@IsaacGonzalez
IsaacGonzalez / portal.properties
Last active August 29, 2015 14:04
Propiedades para incluir todos los archivos de javascript en barebone.jsp y everything.jsp
javascript.barebone.files=\
\
#
# YUI core
#
\
aui/aui/aui.js,\
aui/aui-base-html5-shiv/aui-base-html5-shiv.js,\
\
#