Skip to content

Instantly share code, notes, and snippets.

View mikaelhadler's full-sized avatar
🌻
Make your reality

Mikael Hadler mikaelhadler

🌻
Make your reality
View GitHub Profile
import React from 'react';
import 'antd/dist/antd.css';
import './App.css';
import { Layout, Menu, Breadcrumb } from 'antd'
const { Header, Content, Footer } = Layout
function App() {
return (
<div className="App">
<Layout className="layout">
@mikaelhadler
mikaelhadler / google-sheet-to-json.js
Created September 19, 2019 12:41 — forked from jonobr1/google-sheet-to-json.js
A node.js script to convert a Google Sheet into a JSON object
/**
* Simple Node.js script to turn a specific page on a Google Sheet
* into a JSON object for the main purpose of HTML Templating.
*
* @author jonobr1 / http://jonobr1.com
*
*/
var https = require('https');
var path = require('path');
<script>
import BlogSection from "~/components/Sections/BlogSection"
import { getAllPosts } from './plugins/getPosts'
console.log('component: ', getAllPosts)
}
</script>

Issue Reference

$ npm -v
: not foundram Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm:
: not foundram Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm:
/mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in")
i have node installed for windows (off the nodejs site).
@mikaelhadler
mikaelhadler / .zshrc
Created May 30, 2019 01:49
oh-my-zsh + nvim + fzf + POWERLEVEL9K + prettier
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/mikael/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@mikaelhadler
mikaelhadler / .vimrc
Created May 7, 2019 01:51
mapping keyboard shortcuts for NERDTree in vim
nmap <F6> :NERDTreeToggle<CR>
@mikaelhadler
mikaelhadler / npm-without-sudo.md
Created April 22, 2019 13:28
Use npm without root or sudo rights on Linux

Today we're going to setup our npm installation to be used without root or sudo rights.

By default, if you install packages globally with npm, npm tries to install them into a system directory (i.e. /usr/local/lib/node_modules). With the next steps, we're going to use your home directory for those files.

First we create a directory in your home directory where all the npm packages will be installed.

$ mkdir ~/.node
const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const { VueLoaderPlugin } = require('vue-loader');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { NODE_ENV } = process.env;
@mikaelhadler
mikaelhadler / launch.json
Created January 22, 2019 14:25
Config file debugger Vue.js apps in VS Code
{
"version": "0.2.0",
"configurations": [
{
"type": "browser-preview",
"name": "Browser Preview: Attach",
"request": "attach"
},
{
"type": "browser-preview",
@mikaelhadler
mikaelhadler / dockerfile
Last active March 29, 2019 16:13
Production example
#==================== Building Stage ================================================
# Create the image based on the official Node 8.9.0 image from Dockerhub
FROM node:9
# Create a directory where our app will be placed. This might not be necessary
RUN mkdir -p /app
# Change directory so that our commands run inside this new directory
WORKDIR /app