Skip to content

Instantly share code, notes, and snippets.

View stefanledin's full-sized avatar

Stefan Ledin stefanledin

View GitHub Profile
// Does not work! 😕
export default {
props: ['todo'],
data() {
const data = this.todo;
data.isComplete = false;
return data;
},
watch: {
isComplete: function(value) {
[
{
"key": "cmd+t",
"command": "workbench.action.terminal.focus"
},
{
"key": "cmd+t",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
}
[
{
"key": "cmd+0",
"command": "workbench.action.focusActiveEditorGroup",
"when": "filesExplorerFocus"
}
]
{
"explorer.openEditors.visible": 0,
"workbench.colorTheme": "Cobalt Next",
"editor.fontSize": 15,
"editor.lineHeight": 30,
"workbench.activityBar.visible": false,
"editor.lineNumbers": "relative",
"editor.minimap.enabled": false,
"sublimeTextKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+1",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
const express = require('express')
const app = express()
const cookieParser = require('cookie-parser');
const session = require('express-session')
const mongoose = require('mongoose');
const MongoStore = require('connect-mongo')(session);
mongoose.connect('mongodb://localhost/my-database', {
useMongoClient: true
});
<?php
/*
Template name: Homepage
*/
get_header();
if ( have_rows('slider') ) : while ( have_rows('slider') ) : the_row();
/**
* Image and video
<?php
if ( have_rows('promotion_boxes') ) : while ( have_rows('promotion_boxes') ) : the_row();
/**
* The image
*/
if ( $image = get_sub_field('image') ) {
echo sprintf( '<img src="%s">', $image['url'] );
}
<?php
/*
Template name: Product
*/
get_header();
?>
<?php
$hero_background = get_field('hero_background_image');
?>
<section class="hero" style="background: url(<?php echo $hero_background['url'];?>);">
import Vue from 'vue';
const app = new Vue({
el: '#app',
data: {
message: 'Hello'
}
});