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
04fee87dde12e9980ebd84f2827ba18cc5dc4d1a8b127f6937c2707f0f7f7faa742fb5da9c9fa9a59927f60962fb689769afaa836ce6d73634b8fca4c44c4211b9
@NetOpWibby
NetOpWibby / access.svelte
Last active August 22, 2021 21:18
Sapper session handling (creation and updating). Idk if this is the best way of doing things but at least it *works*. Feel free to scrutinize this code and let me know all the ways it sucks.
<script>
// import
import { onMount } from "svelte";
// util
import { metadata } from "~util";
// redirect
onMount(() => {
// `location.replace` forces a hard refresh in the browser,
@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 / 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 / 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

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 / 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")
@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 / prettySortByKeys.js
Created February 18, 2020 23:18 — forked from aleph-naught2tog/prettySortByKeys.js
Sort an object by keys
const sortByKeysLegibly = maybeObject => {
// presumably we want the array to stay ordered. Possibly not, but if there is
// anything that should preserve order, it's an array
if (maybeObject instanceof Array) {
return maybeObject;
}
// don't sort strings etc
if (typeof maybeObject !== 'object') {
return maybeObject;
@NetOpWibby
NetOpWibby / README.md
Created February 20, 2020 04:32 — forked from miku/README.md
git --track vs --set-upstream vs --set-upstream-to

README

Short excursion into git --track, --set-upstream and --set-upstream-to.

All examples use the aliases co for checkout and br for branch.

Setup:

$ git clone [email protected]:AKSW/OntoWiki.git