{"id":19730601,"url":"https://github.com/begriffs/haskell-pair","last_synced_at":"2025-04-30T01:32:59.108Z","repository":{"id":17401765,"uuid":"20174394","full_name":"begriffs/haskell-pair","owner":"begriffs","description":"Haskell pair programming server via Vagrant","archived":false,"fork":false,"pushed_at":"2017-10-10T16:30:28.000Z","size":492,"stargazers_count":41,"open_issues_count":4,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T21:34:27.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/begriffs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-26T04:51:09.000Z","updated_at":"2024-02-15T15:40:50.000Z","dependencies_parsed_at":"2022-08-28T12:01:03.642Z","dependency_job_id":null,"html_url":"https://github.com/begriffs/haskell-pair","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fhaskell-pair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fhaskell-pair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fhaskell-pair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fhaskell-pair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/begriffs","download_url":"https://codeload.github.com/begriffs/haskell-pair/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251611741,"owners_count":21617454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T00:16:54.978Z","updated_at":"2025-04-30T01:32:58.798Z","avatar_url":"https://github.com/begriffs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://begriffs.com/posts/2014-06-09-pair-programming-with-haskell-and.html\"\u003e\u003cimg src=\"screencast.png\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\n### on a local virtualbox\n\n1. Clone this repo\n1. Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)\n1. `vagrant up`\n1. `vagrant ssh`\n\nThis will create a clean dev environment with the newest GHC and\nCabal.  It also includes\n[haskell-vim-now](https://github.com/begriffs/haskell-vim-now), a\nvim configured to be a Haskell IDE.\n\n### on a public pair programming server\n\n1. Clone this repo\n1. Install [Vagrant](http://www.vagrantup.com/)\n1. Sign up at [DigitalOcean](https://www.digitalocean.com/)\n1. Fill out your DigitalOcean client ID and API key in `Vagrantfile`\n1. `vagrant plugin install vagrant-digitalocean`\n1. `vagrant box add digital_ocean https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box`\n1. `vagrant up --provider=digital_ocean`\n1. `vagrant ssh`\n\nYou'll be logged in to a newly created DigitalOcean \"droplet.\"\n\nps: for some reason I had to create a ssh key with a password otherwise\nI could not get ssh access to the box\n\n## Included software\n\n1. Ubuntu 16.04\n1. New GHC via Stack\n1. [haskell-vim-now](https://github.com/begriffs/haskell-vim-now)\n1. [SixArm git config](https://github.com/SixArm/sixarm_git_gitconfig)\n1. Firewall, hardened OpenSSH, Fail2ban\n1. Oh My ZSH, Tmux/wemux\n1. Mumble voice chat server (port 64738)\n\n## Pairing\n\nTo pair program with someone you can give them login access by\nrunning\n\n```sh\npair github_name\n```\n\nThey connect to your server by `ssh-add`'ing their Github SSH key\nand running `ssh friend@[your-server-ip]`.\n\nWhen you're done working with them, run\n\n```sh\nunpair\n```\n\n## Tmux Keybindings\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-a |\u003c/td\u003e\u003ctd\u003eSplit vertically\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-a _\u003c/td\u003e\u003ctd\u003eSplit horizontally\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-h\u003c/td\u003e\u003ctd\u003eMove to leftward pane\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-l\u003c/td\u003e\u003ctd\u003eMove to rightward pane\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-j\u003c/td\u003e\u003ctd\u003eMove to downward pane\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-k\u003c/td\u003e\u003ctd\u003eMove to upward pane\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-a [\u003c/td\u003e\u003ctd\u003eDetach cursor to scroll (ENTER stops)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-a c\u003c/td\u003e\u003ctd\u003eCreate new window\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-a [0-9]\u003c/td\u003e\u003ctd\u003eSwitch to numbered window\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Publishing a bare git repo to export work (safest)\n\nTo safely write code in the pairing environment and then export it to\nsome kind of github account, you'll probably want to create a\nbare-repo locally on the pairing server, push your development to that,\nand then pull your new work onto your safe local development laptop,\nwhere you can then push it to your gitlab/ github server safely.\n\n\n###### On Pairing Server\n```\n# Creating a bare repo, a safe portal allowing code to flow into safer places\n$ sudo mkdir /pairing \u0026\u0026 sudo chown ${USER} /pairing\n$ mkdir /pairing/my_project \u0026\u0026 cd \"$_\"\n$ git init --bare\n\n```\n\n###### On Your Local System\n```\n# Push the code to the remote\n$ git remote add pairing-server:/pairing/my_project\n$ git push pairing-server master\n```\n\n###### On Pairing Server\n```\n# Clone the bare repo, and start hacking\n$ mkdir ~/dev \u0026\u0026 cd ~/dev\n$ git clone /pairing/my_project\n$ cd my_project\n\n$ echo 'hi' \u003e\u003e README.md \u0026\u0026 git add . \u0026\u0026 git commit -m \"adds a thing\"\n$ git push origin master # it's now waiting in the portal :)\n```\n\n###### On Your Local System\n```\n# Collect the new code\n$ git pull pairing-server master\n```\n\n\n## SSH agent forwarding (for use with trusted pairs)\n\nIf both parties trust each other, then user agent forwarding can be\nenabled to allow convienient access to your github repos through the\npairing server.  But if trust has not been established, forwarding\nyour user agent can potentially allow one of the pairs usage of all\nthe private keys in your local machine's user agent, and these keys\ncould potentially be misused to access remote machines or delete\ngithub repos, etc, etc.\n\nUnderstanding the\n[risks](https://www.clockwork.com/news/2012/09/28/602/ssh_agent_hijacking),\nto access your github repos on the pairing server use agent forwarding.\n\nEdit your local `~/.ssh/config` file and add an entry for your\npair server host.\n```\nHost [ip address]\n  ForwardAgent yes\n```\n\nBefore ssh'ing into the pairing server run\n```sh\nssh-add ~/.ssh/[keyname]\n```\nand it will be available remotely. To test agent forwarding run\nthis remotely\n```sh\nssh -T git@github.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegriffs%2Fhaskell-pair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbegriffs%2Fhaskell-pair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegriffs%2Fhaskell-pair/lists"}