Skip to content

Instantly share code, notes, and snippets.

**Jeff Escalante**
# Dato & Contentful
There are many areas in which I'd consider Dato to be much stronger of a CMS than
contentful, and one in which I'd consider the opposite to be the case. I will try to be as
balanced as possible with this overview, as I am not employed by dato or anything ‐ my
goal is to ensure that my clients and developers get the best possible experience working
with a CMS.
@stefanoverna
stefanoverna / gist:371f009900bbe9ceec208f5dd1688737
Created April 13, 2016 07:39
List of interests/sports/hobbies
3D printing
Abseiling
Acting
Action figure
Adventure racing
Aerobatics
Aeromodeling
Aggressive inline skating
Aid climbing
Aikido
@stefanoverna
stefanoverna / index.tsx
Created March 28, 2023 09:27
Example of usage of new hooks
import { connect } from 'datocms-plugin-sdk';
connect({
buildItemPresentationInfo(item, ctx) {
// we only want to customize the presentation for records of a specific
// model
if (item.relationships.item_type.data.id !== '810975') {
return undefined;
}
#include <stdio.h>
#include <string.h>
struct KeyPoint
{
char key;
char points;
};
struct KeyPoint rules[] = {
@stefanoverna
stefanoverna / dato.config.js
Last active March 13, 2023 05:22
Simple backup of DatoCMS content
// First option:
// This will dump every content of a DatoCMS space in the "backup" directory
// To be used with the `dato dump` command (see https://docs.datocms.com/other/basic-usage.html)
module.exports = (dato, root, i18n) => {
i18n.availableLocales.forEach(locale => {
root.directory(`backup/${locale}`, localeDir => {
dato.itemTypes.forEach(itemType => {
localeDir.createDataFile(
`${itemType.apiKey}.json`,
import withLayoutProps from 'utils/withLayoutProps';
export const getStaticProps = withLayoutProps(async ({ params: { id } }) => {
const pokemon = await api.getPokemonById(id);
return {
props: { pokemon },
};
});
@stefanoverna
stefanoverna / accentate.json
Created January 27, 2021 08:49
Karabiner Italian Accents: put this in <CONFIG_FOLDER>/assets/complex_modifications/
{
"title": "Lettere accentate",
"rules": [
{
"description": "Option + e = è",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
snippet oo outline-offset
outline-offset: ${1}
snippet le left
left: ${1}
snippet atf animation-timing-function
animation-timing-function: ${1}
snippet lst list-style-type
list-style-type: ${1}
snippet cw column-width
column-width: ${1}
// https://nec.is/writing/transform-your-codebase-using-codemods/
export default function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
root.find(
j.ExportDefaultDeclaration,
{
declaration: {
@stefanoverna
stefanoverna / sshpass.rb
Created December 23, 2011 09:04
sshpass brew formula
require 'formula'
class Sshpass < Formula
url 'http://downloads.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gz'
homepage 'http://sshpass.sourceforge.net/'
md5 'c52d65fdee0712af6f77eb2b60974ac7'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"