Skip to content

Instantly share code, notes, and snippets.

@kevincolten
kevincolten / notes.md
Last active August 29, 2015 14:26
Notes

brew install mysql

mysql.server start

mysql -uroot

sudo /usr/bin/Weavedssh22.sh start|stop|restart

sudo /usr/bin/Weavedweb80.sh start|stop|restart

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevincolten
kevincolten / post.md
Last active October 24, 2023 00:11
@post Hosting Multiple Repositories With GitHub Pages

GitHub Pages is great for building a personal or project website. It'll default to http://username.github.io, or you can even use your own custom domain name from services like Namecheap, which I will write about in another post soon.

So you set up your GitHub Page for yourself or project, but what if you want to show off some of your other projects you are working on. You can go the poor man's route, and simply just copy everything from another repository into a folder in your username.github.io repository, commit and push the changes to GitHub, and you'll be able to navigate to http://username.github.io/project.

But this comes with some seriously inconvienent and non-conventional drawbacks, such as duplication of code across repositories and manually copy/paste-ing everytime changes are made to update your hosted codebase. Good luck maintaining that.

The other

@kevincolten
kevincolten / lines.html
Created August 12, 2015 16:53
Comparing Consecutively Ran Bokeh Plots
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>line.py example</title>
<link rel="stylesheet" href="bokehjs/build/css/bokeh.css" type="text/css" />
<script type="text/javascript" src="bokehjs/build/js/bokeh.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
@kevincolten
kevincolten / TowersOfHanoi.js
Last active September 27, 2015 21:28
Towers of Hanoi
'use strict';
var prompt = require('prompt');
prompt.start();
var stacks = {
a: [4, 3, 2, 1],
b: [],
c: []
};
@kevincolten
kevincolten / TicTacToe.js
Last active September 19, 2015 20:56
Tic Tac Toe
'use strict';
var prompt = require('prompt');
prompt.start();
var board = [
[' ', ' ', ' '],
[' ', ' ', ' '],
[' ', ' ', ' '],
[' ', ' ', ' ']
@kevincolten
kevincolten / RockPaperScissors.js
Last active August 29, 2015 02:35
Rock Paper Scissors
'use strict';
var prompt = require('prompt');
prompt.start();
function compareHands(hand1, hand2) {
if (hand1 === hand2) {
return "It's a tie!";
}
@kevincolten
kevincolten / Checkers.js
Created September 5, 2015 18:44
Checkers
var colors = require('colors/safe');
var prompt = require('prompt');
function Checker(color, position) {
this.team = color;
this.symbol = null;
if (color === 'red') {
this.symbol = colors.red(String.fromCharCode(0x12022));
} else {
@kevincolten
kevincolten / TicTacToe.js
Last active October 23, 2015 01:33
TicTacToe (GUI)
'use strict';
$(document).ready(function() {
var playerTurn = 'X';
$('[data-cell]').on('click', function() {
$(this).text(playerTurn);
checkForWin();
playerTurn = (playerTurn === 'X') ? 'O' : 'X';
});