This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to function f(x). | |
The most important programming concept is using functions with variables, such as f(x). By understanding how to f(x), you can interpret almost any code. Think of f(x) as a sentence, where f (function) is the verb, and x (variable) is the noun. | |
The function, or verb is the action, such as climb. | |
The variable, or noun is the person, place or thing, such as ladder. | |
Programming languages may look different, but share similar concepts. | |
In Javascript, functions (verbs) are typed followed by parenthesis: climb(). | |
Nouns (variables) can be typed in those parenthesis: climb(ladder). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<file-input v-model="filename" @formData="formData"> | |
<v-btn @click.native="uploadFiles"> | |
</template> | |
<script> | |
import fileInput from './file-input.vue' | |
export default{ | |
components:{fileInput} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** README: | |
Run: npm install --save csv-write-stream | |
Have import.json in the same directory | |
Run: node index.js | |
Let cool for 2 seconds before serving export.csv | |
Set sendHeaders to false to remove headers from CSV | |
***/ | |
var fs = require('fs') | |
var csvWriter = require('csv-write-stream') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<component :is="DefaultLayout"> | |
<router-view></router-view> | |
</component> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get update | |
echo mysql-server-5.5 mysql-server/root_password password PASSWORD | debconf-set-selections | |
echo mysql-server-5.5 mysql-server/root_password_again password PASSWORD | debconf-set-selections | |
apt-get install -y mysql-common mysql-server mysql-client | |
apt-get install -y apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.AuthController = Ember.Controller.extend({ | |
user: null, | |
isAdmin: false, | |
isGuest: true, | |
actions: { | |
login: function() { | |
console.log('logging in'); | |
var self = this; | |
var response = $.Deferred(); | |
$.ajax({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.ApplicationController = Ember.Controller.extend({ | |
observePath: function() { | |
if (this.get('currentPath') !== 'index') { | |
$(window).scrollTop(264) | |
} else { | |
$(window).scrollTop(0) | |
} | |
}.observes('currentPath') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.ApplicationController = Ember.Controller.extend({ | |
hideHeader: false, | |
observePath: function() { | |
if (this.get('currentPath') !== 'index') { | |
this.set('hideHeader', true); | |
$('#header').slideUp(); | |
} else { | |
this.set('hideHeader', false); | |
$('#header').slideDown(); | |
} |
NewerOlder