Skip to content

Instantly share code, notes, and snippets.

View my-slab's full-sized avatar
🌃
always tired

Mitch Stewart my-slab

🌃
always tired
  • Melbourne, Australia
View GitHub Profile
Plans
List
click -> Preview
new -> New
Preview
cancel -> List
edit -> Edit View
view -> Detail View
Detail View
cancel -> List
Plans
List
click -> Preview
new -> New
Preview
cancel -> List
edit -> Edit View
view -> Detail View
Detail View
cancel -> List
const capitalize = R.compose(
R.join(''),
R.juxt([
R.compose(
R.toUpper,
R.head
),
R.tail
])
)
<!doctype html>
<html lang="en">
<body>
<iframe id="theIframe" width="400" height="600" sandbox="allow-popups allow-scripts allow-forms allow-same-origin"></iframe>
<script>
var html = '<html><h1>hello world!</h1></html>'
var blob = new Blob([html], {type: 'text/html'})
var url = URL.createObjectURL(blob)
theIframe.src = url
</script>
@my-slab
my-slab / test_helper.exs
Last active June 4, 2018 06:06
Annotate the tests you only want to run with @tag :only
ExUnit.start(exclude: [:test], include: [:only])
import React from 'react';
import { compose, mapProps } from 'recompose';
import someAction from './someAction';
export const Component = ({ handleOnClick }) => (
<button onClick={handleOnClick}>Ayyy lmao</button>
);
const enhance = compose(

Keybase proof

I hereby claim:

  • I am mylsb on github.
  • I am myslab (https://keybase.io/myslab) on keybase.
  • I have a public key ASBJXmvTPBV7iRxZEjqBgQ6sAFWioop9UMhfAOvfJ1SH0wo

To claim this, I am signing this object:

@my-slab
my-slab / get_posts.py
Last active May 10, 2018 17:32
Basic example of using the Python for Facebook SDK to get all the posts on a user's timeline.
import facebook
import requests
def some_action(post):
""" Here you might want to do something with each post. E.g. grab the
post's message (post['message']) or the post's picture (post['picture']).
In this implementation we just print the post's created time.
"""
print post['created_time']