Skip to content

Instantly share code, notes, and snippets.

View NetOpWibby's full-sized avatar
🌿
imagine being mad, touch grass

netop://ウィビ NetOpWibby

🌿
imagine being mad, touch grass
View GitHub Profile
@NetOpWibby
NetOpWibby / nationwide.ipynb
Created February 4, 2020 20:01 — forked from willettk/nationwide.ipynb
Make a list of all the (English) Wikipedia page titles that can be sung to the tune of the Nationwide jingle.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NetOpWibby
NetOpWibby / index.html
Created January 30, 2020 05:43 — forked from billiegoose/index.html
magic portal (isomorphic-git)
<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")

Setup a simple GIT server for testing on RHEL7

Prepare and setup a simple git server to be used over ssh

  1. Prepare remote server

    # yum -y install git
    # useradd -c "GIT User" -s /usr/bin/git-shell git
    # mkdir ~git/.ssh
    

touch ~git/.ssh/authorized_keys

@NetOpWibby
NetOpWibby / git-daemon
Created January 29, 2020 07:59 — forked from jeremiah/git-daemon
systemd-unit for git-daemon
# 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
@NetOpWibby
NetOpWibby / graphql.d.ts
Created November 24, 2019 21:11 — forked from mohsen89z/graphql.d.ts
Resolve .graphql import for medium
declare module '*.graphql' {
import { DocumentNode } from 'graphql'
const Schema: DocumentNode
export = Schema
}
@NetOpWibby
NetOpWibby / index.html
Created November 4, 2019 18:25 — forked from iamsaso/index.html
GraphiQL with JWT
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
@NetOpWibby
NetOpWibby / nodejs-tcp-example.js
Created March 10, 2018 03:49 — forked from tedmiston/nodejs-tcp-example.js
Node.js TCP client and server example
/*
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');
@NetOpWibby
NetOpWibby / spacy_intro.ipynb
Created February 21, 2018 14:52 — forked from aparrish/spacy_intro.ipynb
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NetOpWibby
NetOpWibby / better-nodejs-require-paths.md
Created February 15, 2018 22:17 — forked from ToanTranX/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

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.

Possible solutions

@NetOpWibby
NetOpWibby / pagination.ts
Created February 15, 2018 06:42 — forked from mattmazzola/pagination.ts
GraphQL Pagination Implementation
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 }
})