Skip to content

Instantly share code, notes, and snippets.

View h2xd's full-sized avatar

Andrej Schujkow h2xd

View GitHub Profile
@joshangell
joshangell / PhpStorm-and-Gridsome.md
Last active December 21, 2022 10:13
Quick and dirty explanation of how to get autocomplete, syntax highlighting etc when using Gridsome in PhpStorm.

PhpStorm

  1. Make sure your gridsome dev server is running: cd frontend and then yarn dev or npm run dev
  2. Install JS GraphQL plugin: https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
  3. Select everything inside <page-query>, click the light bulb icon, choose "Inject language or reference" and select GraphQL, like this:

NOTE: you only have to do this once and then all your .vue files will support GraphQL queries inside <page-query> tags.

@theatlasroom
theatlasroom / basic-post-receive-hook-with-pm2
Last active August 16, 2022 23:00
Basic post-receive hook - node + pm2
#!/bin/sh
# This is for an expressjs node app, it uses npm + bower packages and pm2 to start the app
# [pm2](https://github.com/Unitech/pm2)
# Assumes you've created a [bare git repo](https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server) with on your server with git init --bare
# Adapted from http://javascript.tutorialhorizon.com/2014/08/17/push-to-deploy-a-nodejs-application-using-git-hooks/
PORT=1337
APP_NAME="app-name"
APP_ROOT="/var/www/app"
@gpessia
gpessia / Helvetica Neue stack
Created January 24, 2014 11:28
Helvetica Neue CSS font-family stack. Is there a web-safe Helvetica Neue CSS font-family stack? - See more at: http://rachaelmoore.name/posts/design/css/web-safe-helvetica-font-stack/#sthash.lt6rYYGz.dpuf
/**
* Helvetica Neue Normal (No Stretch)
*/
/* Helvetica Neue Black Font Stack */
.{font-family: "HelveticaNeueBlack", "HelveticaNeue-Black", "Helvetica Neue Black", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:800; font-stretch:normal;}
/* Helvetica Neue Heavy Font Stack */
.{font-family: "HelveticaNeueHeavy", "HelveticaNeue-Heavy", "Helvetica Neue Heavy", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:700; font-stretch:normal;}