Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Matthaus Woolard hishnash

🏠
Working from home
View GitHub Profile
@hishnash
hishnash / ExampleWindowReaderApp.swift
Created Dec 21, 2020
Access to the underlying UIWindow & NSWindow in swiftUI gives access to window methods and attributes.
View ExampleWindowReaderApp.swift
//
// ExampleWindowReaderApp.swift
// Shared
//
// Created by Matthaus Woolard on 21/12/2020.
//
import SwiftUI
@main
View main.swift
import SwiftUI
@main
struct ExampleCommandsApp: App {
var body: some Scene {
DocumentGroup(
newDocument: ExampleCommandsDocument()
) { file in
ContentView(
View ThreadSafeReferenceDecoder.swift
var connectionRef: ThreadSafeReference<NetworkConnection>? = nil
var connection: NetworkConnection? {
get {
guard let ref = self.connectionRef else {
return nil
}
self.mutex.lock()
defer {
self.mutex.unlock()
View Swift4 crash log
CompileSwift normal arm64 /Users/matthaus/learning/Sockets/Sockets/Models/realm/Frame.swift
cd /Users/matthaus/learning/Sockets
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/matthaus/learning/Sockets/Sockets/Models/document/WSFrame+CoreDataClass.swift /Users/matthaus/learning/Sockets/Sockets/Models/document/Body+CoreDataProperties.swift /Users/matthaus/learning/Sockets/Sockets/Models/document/HTTPRequest+CoreDataClass.swift /Users/matthaus/learning/Sockets/Sockets/Networking/WSConnection.swift /Users/matthaus/learning/Sockets/Sockets/Models/document/HTTPRequest+CoreDataProperties.swift /Users/matthaus/learning/Sockets/Sockets/Models/document/HTTPHeader+CoreDataProperties.swift /Users/matthaus/learning/Sockets/Sockets/Models/document/HTTPHeader+CoreDataClass.swift /Users/matthaus/learning/Sockets/Sockets/Models/document/Connection+CoreDataProperties.swift /Users/matthaus/learning/Sockets/Sockets/Models/realm/NetworkConnection.swift
View blog.rst

Documentation Engine Demo

This is a demo of how our documentation engine to see the real Paw docs go to Paw Docs

.. bc::
    :noindex: true

    * Paw Docs Engine demo
View Node.js
import React, { Component } from 'react'
import { getComponent } from './helper'
// This function is used to lookup a Compment
// given a python module.class key
export default class Node extends Component {
static propTypes = {
attributes: React.PropTypes.object.isRequired,
children: React.PropTypes.array,
View BulletList.js
// Example of a simple Node Component
export default class BulletList extends Node {
static childContextTypes = {
isInList: React.PropTypes.bool
};
getChildContext() {
return { isInList: true }
}
View part_of_the_json_ast.json
{
"module": "docutils.nodes",
"type": "literal_block",
"children": [
{
"module": "docutils.nodes",
"type": "Text",
"children": [],
"attributes": {
"text": "function evaluate(context){\n var dv = new DynamicValue('com.luckymarmot.URLEncodingDynamicValue', {\n 'input': 'Something to be URL-encoded'\n });\n return dv.getEvaluatedString();\n};"
View mappings_exmple.js
const CLASS_MAPPINGS = {
'docutils.nodes.section': Section,
'docutils.nodes.paragraph': Paragraph,
'docutils.nodes.Text': Text,
'docutils.nodes.title': Title,
'docutils.nodes.compound': Compound,
'sphinx.addnodes.compact_paragraph': Paragraph,
'docutils.nodes.bullet_list': BulletList,
'docutils.nodes.definition_list': DefinitionList,
'docutils.nodes.enumerated_list': EnumeratedList,
View build.py
"""
This is an example gist combining a few different source files from our build
script.
licensed to be under MIT
copywrite: Matthaus Woolard 2016 matthaus.woolard@gmail.com
"""
import json
import os