Skip to content

Instantly share code, notes, and snippets.

View ilopez's full-sized avatar

Israel Lopez ilopez

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom YouTube Video Sync</title>
<script src="https://www.youtube.com/iframe_api"></script>
<style>
/* Styling the headings */
h2, h3 {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom YouTube Video Sync</title>
<script src="https://www.youtube.com/iframe_api"></script>
<style>
/* Styling the headings */
h2, h3 {
@ilopez
ilopez / vt_double.html
Created October 15, 2024 22:27
Plays a YT Video with a Custom Offset - IBR Project Preview
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom YouTube Video Sync with Pause/Resume</title>
<script src="https://www.youtube.com/iframe_api"></script>
</head>
<body>
<h2>Custom YouTube Video Sync with Pause/Resume</h2>
@ilopez
ilopez / fishbowl_database_test.cs
Created February 14, 2017 23:52
Test Firebird and MySQL Connection
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper;
using FirebirdSql.Data.FirebirdClient;
using MySql.Data.MySqlClient;
<font size="14" weight="bold">EasyPost Rating Estimate</font>
<br><br>
<p>Sales Order: 50005</p>
<pre>
Carrier Service Speed Rate
UPS Ground 3-5 Days $20.00
UPS Ground 3-5 Days $20.00
@ilopez
ilopez / Resource.Designer.cs
Created April 1, 2016 04:16
Regenerated Xamarin Forms Resource Designer CS - Visual Studio 2015
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ilopez
ilopez / Resource.Designer.cs
Created April 1, 2016 04:00
New Xamarin Forms Universal App in Visual Studio 2015
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ilopez
ilopez / gson-unirest.java
Created March 25, 2016 15:54
Using Gson with Unirest
Unirest.setObjectMapper(new ObjectMapper() {
private Gson gson = new Gson();
public <T> T readValue(String s, Class<T> aClass) {
try{
return gson.fromJson(s, aClass);
}catch(Exception e){
throw new RuntimeException(e);
}
}
@ilopez
ilopez / KRestClient.cs
Created December 19, 2015 21:56
Implementing Exponential Backoff in RestSharp for Execute<T> Method
public class KRestClient : RestClient
{
public Int32 RequestRetryCount = 5; // Attempt Types
public Int32 BackoffRate = 100; // Milliseconds
public KRestClient(string baseUrl) : base(baseUrl)
{
}
public override IRestResponse<T> Execute<T>(IRestRequest request)
select
part.num,
part.description,
SUM(tag.qty) as qoh,
SUM(tag.qtycommitted) as qtycmtd
from part
join tag on tag.partid = part.id
where part.activeflag = 0
and part.id > 0
group by 1,2