Skip to content

Instantly share code, notes, and snippets.

View ellor1138's full-sized avatar

Simon ellor1138

  • Maison
  • Montreal, Qc
View GitHub Profile
@ellor1138
ellor1138 / css-named-colors-in-webkit.js
Created September 2, 2011 12:51 — forked from peol/css-named-colors-in-webkit.js
All named CSS colors in webkit as a JS Object
// Source: http://www.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/platform/ColorData.gperf&exact_package=chromium&type=cs
// There's also an RGB one defined here: http://www.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/inspector/front-end/Color.js&exact_package=chromium&q=indianred&l=393
var CSS_NAMED_COLORS = {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
@ellor1138
ellor1138 / fr-CA.json
Created September 19, 2012 13:35
French Canadian Localization
{
"date": {
"abbr_day_names":"Dim,Lun,Mar,Mer,Jeu,Ven,Sam"
,"abbr_month_names":"Janv.,Févr.,Mars,Avr.,Mai,Juin,Juil.,Août,Sept.,Oct.,Nov.,Déc."
,"day_names":"Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi"
,"month_names":"Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre"
}
}
@ellor1138
ellor1138 / CFWHeels model validation based on action
Last active August 29, 2015 14:06
CFWHeels model validation based on action
This will enable you to run CFWheels validation functions based on the params.action.
With this, you can validate certain properties only for certain actions.
Controller.cfc
Function setParamsValidation
Add params to the request scope.
YourController.cfc
Use a filter in your controllers to call setParamsValidation.
@ellor1138
ellor1138 / Summnernote-fr-CA
Last active August 29, 2015 14:06
Summernote - fr-CA
// Text translation for Summernote text editor (http://hackerwins.github.io/summernote)
'fr-CA': {
font: {
bold: 'Gras',
italic: 'Italique',
underline: 'Souligner',
strike: 'Barré',
clear: 'Retirer le style de police',
height: 'Hauteur de ligne',
name: 'Famille de polices',
@ellor1138
ellor1138 / ArraySumListToArray
Last active September 8, 2022 10:36
Calculate total from array
// Sum a Query Column in ColdFusion
total = ArraySum( ListToArray( ValueList( query.col ) ) );
Verifying that "ellor1138.id" is my Blockstack ID. https://onename.com/ellor1138
@ellor1138
ellor1138 / gist:a83071339224d9f19f176933a11f5be0
Created July 5, 2019 18:31
Find value in comma delimited list (SQL)
loc.query = New Query(datasource=get("dataSourceName"));
loc.query.setSQL(
SQL="SELECT column FROM table WHERE (',' + RTRIM(columns) + ',') LIKE '%,#value#,%'"
);
loc.query = loc.query.execute().getResult();;
@ellor1138
ellor1138 / video.html
Created January 20, 2020 13:38
Embeded responsive video with Bootstrap
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>