Skip to content

Instantly share code, notes, and snippets.

View MrLoh's full-sized avatar

Tobias Lohse MrLoh

View GitHub Profile
@MrLoh
MrLoh / _generator.rb
Last active August 29, 2015 14:23
Jekyll archive generator
MONTH_NAMES = ["", "January", "February", "March", "April", "May", "June", "July", "August", "September", "Oktober", "November", "December"]
def write_template_file(path, permalink, title, options={})
unless File.exists?(path)
File.open(path, 'w') do |f|
f.puts "---"
f.puts "layout: archive"
f.puts "permalink: '#{permalink}'"
f.puts "redirect_from: 'archive/#{permalink}'"
f.puts "title: '#{title}'"
#!/bin/sh
#
# This hook does two things:
#
# 1. update the "info" files that allow the list of references to be
# queries over dumb transports such as http
#
# 2. if this repository looks like it is a non-bare repository, and
# the checked-out branch is pushed to, then update the working copy.
# This makes "push" function somewhat similarly to darcs and bzr.
@MrLoh
MrLoh / keybase.md
Last active November 18, 2015 21:01

Keybase proof

I hereby claim:

  • I am mrloh on github.
  • I am mrloh (https://keybase.io/mrloh) on keybase.
  • I have a public key whose fingerprint is 2D6C 6615 F596 6C9F AEF5 0C21 BE93 3636 E10E 8D48

To claim this, I am signing this object:

@MrLoh
MrLoh / MIT-IntroCS-Part1.ipynb
Last active December 22, 2015 00:29
MIT-IntroCS-Part1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
superagent "^3.5.0"
superagent-retry "^0.6.0"
-ansi-escapes@^1.0.0, ansi-escapes@^1.1.0, ansi-escapes@^1.4.0:
+ansi-escapes@^1.1.0, ansi-escapes@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
@@ -184,10 +184,6 @@ anymatch@^1.3.0:
arrify "^1.0.0"
@MrLoh
MrLoh / Article.js
Created January 31, 2018 10:14
React native Markdown
// @flow
import * as React from 'react';
import styled, { withTheme } from 'styled-components/native';
import { Text, StyleSheet } from 'react-native';
import { pure, compose } from 'recompose';
import { linkHandler, parseMarkdown, log } from '../utils/';
import { WrappedImage } from '../elements';
const Wrapper = styled.View`
// @flow
import { ApolloClient } from 'apollo-client';
import { ApolloLink } from 'apollo-link';
import { HttpLink } from 'apollo-link-http';
import { RetryLink } from 'apollo-link-retry';
import { AuthLink } from './link-auth';
import cache from './cache';