Skip to content

Instantly share code, notes, and snippets.

Avatar

Žiga Krašovec zigcccc

View GitHub Profile
@bradtraversy
bradtraversy / ssh.md
Last active May 26, 2022
SSH & DevOps Crash Course Snippets
View ssh.md

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@JacobBennett
JacobBennett / blog.md
Last active Apr 27, 2022
Clean up your Vue modules with ES6 Arrow Functions
View blog.md

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.

<script>

// require vue-resource...

new Vue({
View Webpack config for Sass+ES6+LiveReload.md

#Webpack + ES6 + Sass + Live reload

Basic example of webpack config to work with sass, es6 and live reload.

To get live reload working you need:

  • get package.json and webpack.config.js to your project foldee
  • run in terminal npm install
  • add this script <script src="http://localhost:35729/livereload.js"></script> to your index.html
  • create src folder and src files
  • run in terminal webpack
@clarle
clarle / app.js
Created Jul 26, 2012
Short tutorial on how to use Express and node-mysql
View app.js
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',