Skip to content

Instantly share code, notes, and snippets.

View edwardceballos's full-sized avatar

Edward Ceballos edwardceballos

  • Bogotá, Colombia
View GitHub Profile
@edwardceballos
edwardceballos / sm-annotated.html
Created July 27, 2024 15:01 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@edwardceballos
edwardceballos / development-environment.md
Last active September 26, 2022 11:31
Development-environment.md
@edwardceballos
edwardceballos / style.css
Created May 30, 2021 14:04 — forked from hsrobbv/style.css
Swagger 2/Swashbuckle Dark Theme
@-moz-document regexp("^\\S+/docs.*$") {
body {
background: #303030;
}
input {
background: #303030;
color: #eee;
border: none;
}
.swagger-section #header {
@edwardceballos
edwardceballos / uuid_v4_excel_formula.txt
Created March 24, 2021 15:08 — forked from msubel/uuid_v4_excel_formula.txt
An Excel Fromula to generate a UUID v4
=LOWER(CONCATENATE(DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;4));4);"-";"4";DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(8;11));DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);DEC2HEX(RANDBETWEEN(0;POWER(16;4));4)))
using System;
using System.Text;
using System.ServiceModel.Channels;
using System.Xml;
using System.IO;
using System.Security.Cryptography;
using System.Resources;
using System.Security.Cryptography.X509Certificates;
namespace eMedNySOAPClient

This gist contains multiple files. Each file contains a specific type of Apex or Visualforce comment header.

When code is no longer used, but can not be deleted from your org, add the @deprecated annotation to the File or Method Header.

@edwardceballos
edwardceballos / BlindTrustManager.java
Created August 13, 2020 02:04 — forked from matthewromano/BlindTrustManager.java
Trust Manager to trust all SSL certificates
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.X509TrustManager;
public class BlindTrustManager implements X509TrustManager {
public X509Certificate[] getAcceptedIssuers() {
return null;
}
@edwardceballos
edwardceballos / gist:8a70d326dbed6f7fc00e362b557c4e3d
Created October 4, 2019 00:04
QueryInterceptor Search Case Insensitive Mvc.Jquery.Datatables
public DataTablesResult<Item> Browse(DataTablesParam dataTableParam)
{
var queryable = GetItems().AsQueryable()
.InterceptWith(new SetComparerExpressionVisitor(StringComparison.CurrentCultureIgnoreCase));
return DataTablesResult.Create(queryable, dataTableParam);
}
@edwardceballos
edwardceballos / gist:0130d7846209921977c94ccf6c39e7a0
Created October 4, 2019 00:02 — forked from mcintyre321/gist:6294588
Replacing a case-sensitive methods in an Expression Tree with a case-insensitive equivalents using QueryInterceptor. Very cool! This is runnable in LinqPad if you add the QueryInterceptor Nuget package
void Main()
{
var words = new []{"HELLO"}.AsQueryable().SetComparer(StringComparison.CurrentCultureIgnoreCase);
words.Where (x => x.StartsWith("hel")).Dump();
words.Where (x => x.Contains("ell")).Dump();
words.Where (x => x.EndsWith("llo")).Dump();
words.Where (x => x.Equals("hello")).Dump();
words.Where (x => x == "hello").Dump();
@edwardceballos
edwardceballos / GTD-Mindsweep-list.md
Created September 16, 2019 19:55 — forked from jayasimhan/GTD-Mindsweep-list.md
GTD Mindsweep list

GTD Mindsweep list

Professional

Projects started, not completed

Projects that need to be started

"Look into . . ." projects

Commitments/promises to others