Skip to content

Instantly share code, notes, and snippets.

@indaco
indaco / open-props.style-dictionary-tokens.json
Last active October 24, 2023 08:23
open-props: style-dictionary tokens
{
"radius": {
"1": {
"value": "2px",
"type": "border-radius"
},
"2": {
"value": "5px",
"type": "border-radius"
},
@indaco
indaco / tailwindcss_colors_hsl_vars.css
Last active July 19, 2023 08:17
The full Tailwind CSS color palette as CSS variables in HSL format
/* How to use the variables?
*
* background-color: hsl(var(--slate-100));
* background-color: hsl(var(--green-700) / 0.5);
*/
:root {
/* Slate */
--slate-50: 210 40% 98%;
--slate-100: 210 40% 96.1%;
--slate-200: 214.3 31.8% 91.4%;
@indaco
indaco / tailwindcss_colors_css_vars.css
Created May 31, 2023 15:47
The full Tailwind CSS color palette as CSS variables
:root {
/* Slate */
--slate-50: #f8fafc;
--slate-100: #f1f5f9;
--slate-200: #e2e8f0;
--slate-300: #cbd5e1;
--slate-400: #94a3b8;
--slate-500: #64748b;
--slate-600: #475569;
--slate-700: #334155;
@indaco
indaco / tailwindcss_colors_css_vars_hsl.css
Last active July 5, 2023 08:29
The full Tailwind CSS color palette as CSS variables in HSL format
:root {
/* Slate */
--slate-50: hsl(210deg 40% 98%);
--slate-100: hsl(210deg 40% 96.1%);
--slate-200: hsl(214.3deg 31.8% 91.4%);
--slate-300: hsl(212.7deg 26.8% 83.9%);
--slate-400: hsl(215deg 20.2% 65.1%);
--slate-500: hsl(215.4deg 16.3% 46.9%);
--slate-600: hsl(215.3deg 19.3% 34.5%);
--slate-700: hsl(215.3deg 25% 26.7%);
@indaco
indaco / named_colors.md
Last active July 2, 2023 17:05
A named colors approach for color palettes from https://colorsandfonts.com

Keybase proof

I hereby claim:

  • I am indaco on github.
  • I am indaco (https://keybase.io/indaco) on keybase.
  • I have a public key ASDoSawJjquVTtGi6eb9DT0S-QNbSLLyKeWyOBrAkmOBwAo

To claim this, I am signing this object:

@indaco
indaco / px-time-series-matlab.m
Created June 7, 2017 11:48
Sample Matlab script to retrieve data from the Predix Time Series and show a chart
url = '<predix-time-series-query-url-here>';
options = weboptions('HeaderFields',{'Predix-Zone-Id' '<predix-time-series-one-id-here>';'Authorization' '<token-here>';'Content-Type' 'application/json';'Request-Method' 'post'});
payload ='{"tags":[{"name":"<tag-name-here>"}],"start":"1y-ago"}';
data = webwrite(url, payload, options);
plot(data.tags.results.values(:,1), data.tags.results.values(:,2));
@indaco
indaco / px-timeseries-demo.py
Created June 7, 2017 11:45
Call the Predix Time Series REST APIs to retrieve data and show on a chart
"""
Call the Predix Time Series REST APIs to retrieve data and show on a chart
"""
import pandas as pd
import requests
import json
import base64
from bokeh.io import output_notebook
from bokeh.charts import TimeSeries, output_file, show
@indaco
indaco / sapui5crm-snippet.js
Created November 28, 2012 21:59
SAPUI5 calls CRM Contact REST/OData Service via SAP NetWeaver Gateway
// SAPUI5 CONTROLLER
sap.ui.controller("sample.ContactList", {
// ...
onInit: function() {
var oModel = new sap.ui.model.odata.ODataModel("http://gw.esworkplace.sap.com/sap/opu/sdata/iwcnt/contact", false, 'user', 'pass');
this.getView().setModel(oModel);
var oTable = this.byId("contacts_table");
...
try {
IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
IWDPDFDocumentCreationContext pdfNewDocContext = pdfDocumentHandler.getDocumentCreationContext();
String templateUrl = WDURLGenerator.getPublicResourcePath(wdComponentAPI.getDeployableObjectPart(), "IF.xdp");
InputStream template = new FileInputStream(templateUrl);
byte[] byteFileArray = new byte[template.available()];
template.read(byteFileArray);