This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# 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"' {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 1) Using good old PropTypes */ | |
function Button({ message }) => | |
<button>{message}</button>; | |
Button.propTypes = { | |
message: PropTypes.oneOfType([ | |
PropTypes.string, | |
PropTypes.number, | |
PropTypes.instanceOf(Message) | |
]).isRequired, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Super quick and dirty script to bootstrap our action files with some Flow boilerplate. | |
import re | |
import sys | |
def get_action_constant(l): | |
m = re.search('= \'(.*)\'', l) | |
if m: | |
return m.group(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Codemod for transforming Tape tests into AVA. | |
* | |
* jscodeshift -t tape-to-ava-codemod.js my-folder | |
* | |
* TODO: | |
* - [ ] 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 https://github.com/avajs/ava-codemods/issues/5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sublime Text 3 PackageControl https://packagecontrol.io/ | |
Basic: | |
- Git | |
- GitGutter | |
- Markdown Preview | |
- Pretty JSON | |
- SideBarEnhancements | |
- Cucumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/Solarized Skovhus (SL).tmTheme", | |
"font_face": "menlo", | |
"font_size": 10, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Solarized (Dark)</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
from flask import request, current_app, jsonify | |
def support_jsonp(f): | |
"""Wraps output to JSONP""" | |
@wraps(f) | |
def decorated_function(*args, **kwargs): | |
result = jsonify(f(*args, **kwargs)) | |
callback = request.args.get('callback', False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>triggers</key> | |
<array> | |
<dict> | |
<key>ID</key> | |
<string>QSiTunesPlayPauseTrigger</string> | |
<key>command</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Domenico Carbotta</string> | |
<key>name</key> | |
<string>Blackboard Skovhus Style</string> | |
<key>settings</key> | |
<array> |
NewerOlder