Skip to content

Instantly share code, notes, and snippets.

View supercamilo's full-sized avatar

Juan Jimenez supercamilo

  • Mobile Reach
  • Medellin, Colombia
View GitHub Profile
@kevindb
kevindb / f_truncateWithEllipsis.sql
Created July 6, 2016 18:55
SQL Server function to truncate a string and add an ellipsis
CREATE FUNCTION [dbo].[f_truncateWithEllipsis]
(
@value VARCHAR(8000),
@maxLength INT
)
RETURNS VARCHAR(8000)
AS
BEGIN
SET @value = LTRIM(RTRIM(@value));
@arthurattwell
arthurattwell / dialog.html
Last active August 1, 2022 09:54
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<div style="font-family: sans-serif;">
<? var data = valid(); ?>
<form id="form" name="form">
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?>
<? for (var i = 0; i < data.length; i++) { ?>
<? for (var j = 0; j < data[i].length; j++) { ?>
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br>
<? } ?>
<? } ?>
<? } else { ?>
@lopspower
lopspower / README.md
Last active July 5, 2024 10:20
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store