-
Prepare remote server
# yum -y install git # useradd -c "GIT User" -s /usr/bin/git-shell git # mkdir ~git/.ssh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
<div> | |
<input id="repository" type="text" style="width: 50em" title="Tip: enter a private repo URL to see the credentialManager plugin prompt for a password."> | |
<button type="button" id="cloneButton">Clone</button> | |
</div> | |
<output id="log" style="white-space: pre; font-family: monospace;"></output> | |
<script src="https://unpkg.com/magic-portal"></script> | |
<script> | |
let worker = new Worker("./worker.js") |
This file contains hidden or 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
# conf.d file for git-daemon | |
# | |
# Please check man 1 git-daemon for more information about the options | |
# git-daemon accepts. You MUST edit this to include your repositories you wish | |
# to serve. | |
# | |
# Some of the meaningful options are: | |
# --syslog --- Enables syslog logging | |
# --verbose --- Enables verbose logging | |
# --export-all --- Exports all repositories |
This file contains hidden or 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
declare module '*.graphql' { | |
import { DocumentNode } from 'graphql' | |
const Schema: DocumentNode | |
export = Schema | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
height: 100%; | |
margin: 0; | |
width: 100%; | |
overflow: hidden; | |
} |
This file contains hidden or 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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.
This file contains hidden or 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 graphql = require('graphql'); | |
export function Edge(itemType: any) { | |
return new graphql.GraphQLObjectType({ | |
name: "Edge", | |
description: "Generic edge to allow cursors", | |
fields: () => ({ | |
node: { type: itemType }, | |
cursor: { type: graphql.GraphQLString } | |
}) |