Skip to content
View useful-atom-packages.sh
#!/bin/bash
apm install atom-ternjs
apm install autocomplete-modules
apm install utocomplete-paths
apm install autocomplete-ruby
apm install autocomplete-sass
apm install build
apm install emmet
apm install file-icons
apm install gist-it
View gatsby-node-assign.js
export function modifyWebpackConfig (config) {
// Object.assign is not picked up as mutation by immutable linter ?!
config.loader('jpg', (cfg) => Object.assign(
cfg,
{
test: /\.jpe?g$|\.gif$|\.png$/i,
loader: 'file-loader?name=images/[name].[ext]',
}
))
return config
View gatsby-node.js
// eslint-disable-next-line immutable/no-mutation,no-unused-vars
exports.modifyWebpackConfig = function (config, env) {
config.removeLoader('json')
config.loader('json', (cfg) => {
// eslint-disable-next-line immutable/no-mutation,no-param-reassign
cfg.test = /\.json/
// eslint-disable-next-line immutable/no-mutation,no-param-reassign
cfg.loaders= ['markdown', 'json']
return cfg
})
View fetch-from-contentful.js
#!/usr/bin/env babel-node
require('dotenv').config()
import contentful from 'contentful'
import fs from 'fs-extra-promise'
// Contentful Config
const apiToken = process.env.CONTENTFUL_DELIVERY_API_TOKEN
const spaceId = process.env.CONTENTFUL_SPACE_ID
const client = contentful.createClient({ accessToken: apiToken, space: spaceId })
View post.json
{
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "changeme"
}
},
"id": "changeme",
View -Users-ivan-.cabal-logs-herbalizer-0.4.9.log
cabal: Entering directory '/var/folders/85/c3khd5g15nq5yy8_1m0s40y00000gn/T/cabal-tmp-26301/herbalizer-0.4.9'
Configuring herbalizer-0.4.9...
Building herbalizer-0.4.9...
Preprocessing executable 'herbalizer' for herbalizer-0.4.9...
[1 of 1] Compiling Main ( src/Main.hs, dist/build/herbalizer/herbalizer-tmp/Main.o )
src/Main.hs:152:5: error:
• Non type-variable argument in the constraint: Stream s m Char
(Use FlexibleContexts to permit this)
• When checking the inferred type
View ghcPkgUtils.sh
# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages.
# ghc-pkg-clean -f cabal/dev/packages*.conf also works.
function ghc-pkg-clean() {
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
do
echo unregistering $p; ghc-pkg $* unregister $p
done
}
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place.
View gatsby-node.js
const fs = require('fs-extra')
exports.postBuild = function ign (pages, callback) {
console.log('in IGN!')
const file = 'testing'
fs.outputFile(file, 'works', (err) => {
console.log(err)
})
callback()
}
View notes.md

Start out

install via

  brew tap railwaycat/homebrew-emacsmacport
  brew install emacs-mac --with-spacemacs-icon  # OR, brew cask install emacs-mac
  brew linkapps

Terminology

View init.coffee
atom.packages.onDidActivatePackage (pack) ->
if pack.name == 'ex-mode'
Ex = pack.mainModule.provideEx()
Ex.registerCommand 'redo', ->
atom.workspace.observeTextEditors (editor) ->
editor.redo()
Something went wrong with that request. Please try again.