defaults write com.apple.frameworks.diskimages skip-verify true
defaults write com.apple.finder CreateDesktop false; killall Finder
touch ~/.hushlogin
import { RangeSetBuilder } from "@codemirror/state"; | |
import { Extension } from "@codemirror/state"; | |
import { Decoration, DecorationSet, EditorView, ViewPlugin, ViewUpdate, WidgetType } from "@codemirror/view"; | |
export function indentationGuides(): Extension { | |
return [ViewPlugin.fromClass(IndentationGuides, { decorations: (v) => v.decorations }), indentationTheme]; | |
} | |
// markers can be used at positions on a line over a range | |
const indentationMark = Decoration.mark({ class: "cm-indentation-guide" }); |
@mixin for-phone-only { | |
@media (max-width: 599px) { @content; } | |
} | |
@mixin for-tablet-portrait-up { | |
@media (min-width: 600px) { @content; } | |
} | |
@mixin for-tablet-landscape-up { | |
@media (min-width: 900px) { @content; } | |
} | |
@mixin for-desktop-up { |
When you read about how to create and consume a pre-signed url on this guide, everything is really easy. You get your Postman and it works like a charm in the first run.
Then you open your browser, try your usual $.ajax() and send your PUT operation, and you hit the cold iced wall of AWS error message, a simple <Code>SignatureDoesNotMatch</Code>
that will steal hours from your productivity.
So here I come to save you and give you a free working example of how to upload a file directly to AWS S3 from your browser. You are wellcome :).
// make a "base" component | |
const FakeButton = (props) => ( | |
<div | |
{...props} | |
style={{ | |
cursor: 'default', | |
border: '1px solid', | |
borderRadius: '3px', | |
...props.style | |
}} |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
class Sprockets::DirectiveProcessor | |
# This is basically copied from https://github.com/sstephenson/sprockets/blob/master/lib/sprockets/directive_processor.rb#L289 | |
def process_depend_on_tree_directive(path = ".") | |
if relative?(path) | |
root = pathname.dirname.join(path).expand_path | |
unless (stats = stat(root)) && stats.directory? | |
raise ArgumentError, "depend_on_tree argument must be a directory" | |
end |