Skip to content

Instantly share code, notes, and snippets.

A priest and a shepherd from Australia participate in a TV game. After answering all the questions, there is a tie.
So both are given one final assignment. It is to write a poem in three minutes, using the word "Timbuktu".
It is a city in Africa.
The priest returns with the fruit of his inspiration:
"I was a father all my life,
I had no children, had no wife,
I read the bible through and through
on my way to Timbuktu ... "
@marsch
marsch / metro.config.js
Created May 5, 2021 17:09
metro with symlink support
const fs = require('fs')
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
const isSymlink = dependency =>
<?php
/**
* Show WP author dropdown list
*
* @return array
*/
static function user_list() {
global $cv_admin_users_list;
if ( !empty( $cv_admin_users_list ) ) {
import di from './di'
import { ext } from 'xtpoint'
window.ext = ext
const modulesContext = require.context('../plugins', true, /^\.\/[^\/]+?\/bundle\.js$/)
if (module.hot) {
console.log('accept hot?!??!?!?')
module.hot.accept(modulesContext.id, () => {
import { h, Component } from 'preact'
import { PropTypes } from 'preact-compat'
import { withRouter } from 'react-router'
import { connect } from 'react-redux'
// OPTIONAL: patch Component by default (you might want to delete this if you're a purist)
Component.prototype.linkRef = function(name) {
return linkRef(this, name)
}
export function linkRef(component, name) {
import React from 'react';
import { Router, Route, browserHistory, IndexRoute, Redirect, applyRouterMiddleware } from 'react-router'
import useScroll from 'react-router-scroll';
import BaseComponent from '../base-component';
import ViewContainer from './view-container';
import ViewManager from './view-manager';
class SiteManager extends BaseComponent {
constructor(...args) {
super(...args);
@marsch
marsch / index.js
Created July 28, 2016 20:36
super dirty dynamic routing + static routes + oauth + fetch
import React from 'react'
import {render} from 'react-dom'
import { Link, Router, RouterContext, browserHistory } from 'react-router'
import superagent from 'superagent'
import superagentOauth from '@zalando/superagent-oauth2-client'
import deepFreeze from 'deep-freeze-strict'
import config from './config'
let OAuth = require('@zalando/oauth2-client-js')
{
"name": "scholar",
"dependencies": {
"URIjs": {
"version": "1.14.1",
"from": "URIjs@1.14.1",
"resolved": "https://registry.npmjs.org/URIjs/-/URIjs-1.14.1.tgz"
},
"angular": {
"version": "1.3.8",
<script>
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event) {
data = JSON.parse(event.data);
if (data && data.action == 'addNoteCard') {
console.log('message received');
@marsch
marsch / eventsource.md
Last active August 29, 2015 14:10
test spec

Get Events

Parameters

  • type (String) Response is filtered by the given type (for instance: notecard, bullet)
  • id (String) Response is filtered by given IDs (comma separated list)
  • since (Timestamp) Response includes only events that occurred after that timestamp

Request