Skip to content

Instantly share code, notes, and snippets.

Kenneth Skovhus skovhus

Block or report user

Report or block skovhus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
skovhus /
Last active Apr 17, 2019
Quick and dirty flow-to-typscript migration codemod
# This is a super quick and dirty codemod for migration a codebase from Flow to TypeScript.
# Step 1:
# npm i -g jscodeshift
# Step 2: rename all .js files to .ts(x)
# find src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
# find storybook -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
# find src/**/components -name "*.ts" -exec sh -c 'mv "$0" "${0%.ts}.tsx"' {} \;
skovhus / proptypes-to-flow-example.js
Last active Apr 10, 2017
PropTypes to Flow blog post
View proptypes-to-flow-example.js
/* 1) Using good old PropTypes */
function Button({ message }) =>
Button.propTypes = {
message: PropTypes.oneOfType([
skovhus /
Created Apr 6, 2017
Annotates redux actions files with some Flow types
# Super quick and dirty script to bootstrap our action files with some Flow boilerplate.
import re
import sys
def get_action_constant(l):
m ='= \'(.*)\'', l)
if m:
skovhus / tape-to-ava-codemod.js
Last active Aug 14, 2016
Codemod for Tape to AVA
View tape-to-ava-codemod.js
* Codemod for transforming Tape tests into AVA.
* jscodeshift -t tape-to-ava-codemod.js my-folder
* - [ ] Figure out when to keep `t.end` and when to remove it
* - [ ] rename first param in test callback function, if it is not t
* (and replace usage of identifier in block)
* - [ ] write test and submit to
skovhus / gist:5fcefb38500ef4aa8536
Last active Aug 29, 2015
My Sublime Text 3 packages
View gist:5fcefb38500ef4aa8536
Sublime Text 3 PackageControl
- Git
- GitGutter
- Markdown Preview
- Pretty JSON
- SideBarEnhancements
- Cucumber
skovhus / Preferences.sublime-settings
Last active Aug 29, 2015
Sublime Text 3 preferences
View Preferences.sublime-settings
"bold_folder_labels": true,
"color_scheme": "Packages/User/Solarized Skovhus (SL).tmTheme",
"font_face": "menlo",
"font_size": 10,
"highlight_line": true,
View Solarized (dark - skovhus).tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: -->
<!-- code: -->
<plist version="1.0">
<string>Solarized (Dark)</string>
from functools import wraps
from flask import request, current_app, jsonify
def support_jsonp(f):
"""Wraps output to JSONP"""
def decorated_function(*args, **kwargs):
result = jsonify(f(*args, **kwargs))
callback = request.args.get('callback', False)
skovhus / Triggers.plist
Created Oct 29, 2012
My QuickSilver Triggers
View Triggers.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
skovhus / Blackboard Skovhus Style.tmTheme
Created Oct 29, 2012
My TextMate Theme (Blackboard mod)
View Blackboard Skovhus Style.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Domenico Carbotta</string>
<string>Blackboard Skovhus Style</string>
You can’t perform that action at this time.