This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
| #!/bin/sh | |
| branch="$(git rev-parse --abbrev-ref HEAD)" | |
| # get computer name to append in Chime message | |
| username=$USER | |
| # a branch name where you want to prevent git push. In this case, it's "master" | |
| if [ "$branch" = "master" ]; then | |
| echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup |
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
You can run your Express app very easily inside your Electron app.
All you need to do is to:
your_electron_app\resources\appapp.js file| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Hello World!</title> | |
| <script> | |
| // async communication to app(=browser) | |
| var ipc = require("ipc"); | |
| ipc.on("from-server", function (msg) { | |
| console.log("renderer side: " + msg); |
| class API::V1::BaseController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| before_filter :cors_preflight_check | |
| after_filter :cors_set_access_control_headers | |
| def cors_set_access_control_headers | |
| headers['Access-Control-Allow-Origin'] = '*' | |
| headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
| // | |
| // API.swift | |
| // | |
| // Created by Taro Minowa on 6/10/14. | |
| // Copyright (c) 2014 Higepon Taro Minowa. All rights reserved. | |
| // | |
| import Foundation | |
| typealias JSONDictionary = Dictionary<String, AnyObject> |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
| #!/bin/bash | |
| aptitude -y install expect | |
| // Not required in actual script | |
| MYSQL_ROOT_PASSWORD=abcd1234 | |
| SECURE_MYSQL=$(expect -c " | |
| set timeout 10 |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| var assert = require('assert') | |
| console.log('\n==========='); | |
| console.log(' mongoose version: %s', mongoose.version); | |
| console.log('========\n\n'); | |
| mongoose.connect('localhost', 'testing_1088'); | |
| mongoose.connection.on('error', function () { |