This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# import an MS SQL .bak backup file to an MS SQL database, then export all | |
# tables to csv. run this script as `import.sh <filename>`. It expects to be | |
# run in the same directory as the backup file. | |
# this is only tested on my mac (OS X Catalina). I tried to stick to posix, but | |
# It will probably require some tweaking for you. I hope it gives a general | |
# sense of what you need to do at the very least. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hover.com "Zone file import/export" has been *Planned* since 2011 | |
// https://help.hover.com/entries/471066-Zone-file-import-export | |
// Here's a brittle approximation of export. | |
// | |
// 1. login to your account: https://www.hover.com/domains | |
// 2. run the following in your browser's JavaScript console, changing the first line | |
// to your domain | |
// 3. copy the text logged to the console. | |
// 4. manually correct FQDNs, these have to end with a period "." | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import { debounce } from './utils/debounce'; | |
import { ProCatalogCategoriesQuery } from './queries/proCatalogCategories.gql'; | |
import { makeProCatalogResourcesQuery } from './queries/proCatalogResources'; | |
import Loading from './components/loading.vue'; | |
const GraphqlEndpoint = '/api' | |
const ResultsPerPage = 12; | |
const el = document.querySelector('#professional-catalog-app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag' | |
import { print } from 'graphql/language/printer' | |
import richTextFragment from './contentModules/richText.gql' | |
import logoBlockFragment from './contentModules/logoBlock.gql' | |
import embedBlockFragment from './contentModules/embedBlock.gql' | |
import videoBlockFragment from './contentModules/videoBlock.gql' | |
import imageCollageFragment from './contentModules/imageCollage.gql' | |
import imageGridFragment from './contentModules/imageGrid.gql' | |
import slideshowBlockFragment from './contentModules/slideshowBlock.gql' | |
import singleImageFragment from './contentModules/singleImage.gql' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div | |
ref="stepsApp" | |
class="steps" | |
> | |
<div class="step-item is-active is-success"> | |
<div class="step-marker"> | |
1 | |
</div> | |
<div class="step-details"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Based on https://github.com/appleple/react-modal-video/ */ | |
<template> | |
<div v-if="isOpen"> | |
<div | |
:class="classNames.modalVideo" | |
tabIndex='-1' | |
role='dialog' | |
:aria-label="aria.openMessage" | |
@click="$emit('update:isOpen', false)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://gist.github.com/nmsdvid/8807205#gistcomment-3168449 */ | |
var debounce = (callback, wait = 250) => { | |
let timer; | |
let last_call = 0; | |
return (...args) => { | |
clearTimeout(timer); | |
const now = Date.now(), time_from_last_call = now - last_call; | |
if (time_from_last_call > wait) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use yii\base\Event; | |
use Craft; | |
use craft\elements\Entry; | |
Event::on( | |
Entry::class, | |
Entry::EVENT_AFTER_SAVE, | |
function(ModelEvent $event) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'timber/twig', 'add_to_twig' ); | |
function add_to_twig( $twig ) { | |
$twig->addFilter( new Timber\Twig_Filter( 'noWidows', 'twigNoWidow' ) ); | |
return $twig; | |
} | |
function twigNoWidow($text = "", $numberOfWords = 1, $outputRaw = true ) { |
NewerOlder