Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea95580

Browse files
committed
Fix running locally
1 parent c7c382c commit ea95580

20 files changed

+46
-61
lines changed

.vscode/tasks.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
"command": "source $(dirname ${config:python.pythonPath})/activate && make devserver",
2020
"problemMatcher": []
2121
},
22-
{
23-
"label": "Stop Dev server",
24-
"type": "shell",
25-
"command": "source $(dirname ${config:python.pythonPath})/activate && make stopserver",
26-
"problemMatcher": []
27-
},
2822
{
2923
"label": "Open Site in Browser",
3024
"type": "shell",

Makefile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,8 @@ publish:
3636
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
3737
if test -d $(BASEDIR)/extra; then cp $(BASEDIR)/extra/* $(OUTPUTDIR)/; fi
3838

39-
devserver:
40-
ifdef PORT
41-
$(BASEDIR)/develop_server.sh restart $(PORT)
42-
else
43-
# defaults to port 8000
44-
$(BASEDIR)/develop_server.sh restart
45-
endif
46-
47-
stopserver:
48-
$(BASEDIR)/develop_server.sh stop
49-
@echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
39+
devserver: publish
40+
$(PELICAN) --listen
5041

5142
cleanbranches:
5243
git remote | xargs -n 1 git fetch -v --prune $1

content/atotd-optimizing-cloudfront.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ determines things like how long an item should remain in Cloudfront's cache befo
3939
request again to the origin, or if requests should be auto forwarded from http to https, and
4040
various other settings. The behaviour screen looks something like:
4141

42-
![Cloudfront Behavior]({filename}/static/imgs/cloudfront-behaviour-1.png)
42+
![Cloudfront Behavior]({static}/static/imgs/cloudfront-behaviour-1.png)
4343

4444
By default, all items for your distribution are governed by the settings on this Default
4545
Behaviour. What's really cool/handy is you can define multiple behaviours based upon request

content/building-a-vs-code-ext-without-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Now in VS Code open the command palette and search for
178178
`Remote-Containers: Attach to Running Container...`. Pick this, and then your running
179179
container called `vscodeenv` should appear in the list:
180180
181-
![Attaching to the running image]({filename}/static/imgs/runningContainer.png)
181+
![Attaching to the running image]({static}/static/imgs/runningContainer.png)
182182
183183
Pick it, and VS Code will open a new Window "attached" to the running container. For
184184
more details, consult
@@ -189,7 +189,7 @@ your extension) folder and click OK. You then get a VS Code window "attached" t
189189
the running docker container, with your test extension open and ready to play with.
190190
Here's a screenshot to give an idea:
191191
192-
![Extension open in VS Code]({filename}/static/imgs/attachedToContainer.png)
192+
![Extension open in VS Code]({static}/static/imgs/attachedToContainer.png)
193193
194194
Now you can hit `F5` and VS Code will open up a new Extension Development Host window with
195195
your test extension loaded. In that window you should be able to search for the

content/devopsdaysyyj.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ in Victoria.
114114
Tomorrow conference season continues for me as I'll be attending the 7th annual
115115
Polyglot Unconference in Vancouver, a favourite event of mine. I'll likely blog about what
116116
I see there, but you can also read about what I've seen in prior years in my posts from
117-
prior years [here]({filename}/polyglotconf-2012.md) and [here]({filename}/polyglotconf-2017.md).
117+
prior years [here]({static}/polyglotconf-2012.md) and [here]({filename}/polyglotconf-2017.md).

content/django_admin_piechart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class EmailSubscriberAdmin(admin.ModelAdmin):
4444
If you've never done anything with the Django admin before, this might seem like
4545
magic, 1-line to get a nice date filter in place:
4646

47-
![Date Filters in the Django Admin]({filename}/static/imgs/date_heir_filter.png)
47+
![Date Filters in the Django Admin]({static}/static/imgs/date_heir_filter.png)
4848

4949
As you click those filters, the changeset view will adjust to only those records
5050
which meet that criteria. All this for 1-line of code. Yup, Django's pretty

content/docker-and-image-sizes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN apk del python3-dev gcc build-base
5858
Sweet, and this resulted in an image size of *381MB*, a savings of *NEGATIVE 2MB*.
5959
Wait.... WAT?
6060

61-
![WAT]({filename}/static/imgs/wat.jpg)
61+
![WAT]({static}/static/imgs/wat.jpg)
6262

6363
So I *removed* some stuff and ended up with an image that's a few MB's *larger*?
6464
How does that work?

content/failure-bow-1-aws-lambda-goof.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ around how to improve the performance of my site, one of those being to "Leverag
2424
Browser Caching" by setting a particular HTTP header on resources that don't change
2525
often (ex: images). It'll look something like:
2626

27-
![Leverage Browser Caching]({filename}/static/imgs/pingdomcachewarning-fs8.png)
27+
![Leverage Browser Caching]({static}/static/imgs/pingdomcachewarning-fs8.png)
2828

2929
Specifically you set the
3030
[`Cache-Control` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)
@@ -80,15 +80,15 @@ thinking "ah, that's weird, I'll look into it later".
8080
By the time that "later" happened and I turned off the Lambda, I had accrued around 1.1
8181
million Lambda requests:
8282

83-
![The Lambda call count & costs]({filename}/static/imgs/lambda_costs-fs8.png)
83+
![The Lambda call count & costs]({static}/static/imgs/lambda_costs-fs8.png)
8484

8585
But that's nothing:the real problem was that each one of those lambda calls represented
8686
a PUT to a S3 bucket.
8787
PUT's with S3 are actually one of the more expensive operations. For the `ca-central-1`
8888
region where I host my stuff, it's currently $0.0055 per 1,000 of them. This sounds crazy
8989
cheap, and it is, but when you're doing about 1.1 million of them, well, that adds up:
9090

91-
![The S3 PUT count & costs]({filename}/static/imgs/s3_costs-fs8.png)
91+
![The S3 PUT count & costs]({static}/static/imgs/s3_costs-fs8.png)
9292

9393
Queue the Iron Maiden -- 6, 6, 6, THE NUMBER OF THE BEAST!
9494

@@ -105,6 +105,6 @@ bill into likely well over $100.
105105
But in the end I got a funny picture, this is the graph of my S3 bill for the month of
106106
April:
107107

108-
![Graph of S3 costs]({filename}/static/imgs/s3costgraph-fs8.png)
108+
![Graph of S3 costs]({static}/static/imgs/s3costgraph-fs8.png)
109109

110110
Ouch, that's a pointy point in my pride.

content/git-img-diff-with-iterm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ version that's inlined into your terminal with iTerm's shell integration.
7373
Now when you change an image in a Git repo and do a `git diff` while in iTerm
7474
you'll see a preview of the original image and the changed image. Example:
7575

76-
![Showing the image diffing]({filename}/static/imgs/imgcatDiff.png)
76+
![Showing the image diffing]({static}/static/imgs/imgcatDiff.png)
7777

7878
The above image is the original, the 2nd image is what I changed it to. Note
7979
that because imgcat is iTerm specific, it won't work in other terminals. If
8080
you do a `git diff` in a different terminal (ex: the integrated terminal in
8181
VS Code) you'll see just the ordinary blank output:
8282

83-
![Image diff in non-iTerm terminal]({filename}/static/imgs/imgcatdiffvscode.png)
83+
![Image diff in non-iTerm terminal]({static}/static/imgs/imgcatdiffvscode.png)

content/iterm2-setup.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ preferences go to Profiles -> Keys, and do the following:
4141

4242
Screenshots showing the settings:
4343

44-
![Keyboard Option Key Settings]({filename}/static/imgs/keymapping1.png)
44+
![Keyboard Option Key Settings]({static}/static/imgs/keymapping1.png)
4545

46-
![Keyboard Shortcut dialog for moving by word]({filename}/static/imgs/keymapping.png)
46+
![Keyboard Shortcut dialog for moving by word]({static}/static/imgs/keymapping.png)
4747

48-
![Keyboard Shortcut dialog for moving to start/end of line]({filename}/static/imgs/keymapping2.png)
48+
![Keyboard Shortcut dialog for moving to start/end of line]({static}/static/imgs/keymapping2.png)
4949

5050
## Shell Integration
5151

@@ -77,11 +77,11 @@ What these lines do is define two user variables that can be displayed in variou
7777
spots in iTerm. My badge setting has the value `\(user.pythonVersion)` as you can
7878
see here:
7979
80-
![Badge Setting]({filename}/static/imgs/itermbadge.png)
80+
![Badge Setting]({static}/static/imgs/itermbadge.png)
8181
8282
And then the version displays in the terminal (it's the 3.9.1 in the corner):
8383
84-
![Python Version]({filename}/static/imgs/pythonVersion.png)
84+
![Python Version]({static}/static/imgs/pythonVersion.png)
8585
8686
As I switch to different Python interpreters this value updates.
8787
@@ -107,15 +107,15 @@ completes you'll get a nice toast notification using OSX's notification system.
107107
Shell integration also gives a few handy shell commands, the one I use fairly
108108
often is `imgcat` which allows you to view an image right in the terminal window
109109
110-
![Viewing an Image in the Terminal]({filename}/static/imgs/imgcat.png)
110+
![Viewing an Image in the Terminal]({static}/static/imgs/imgcat.png)
111111
112112
## Status Bar
113113
114114
The iTerm2 status bar is also fully configurable. You can display various items
115115
like CPU load, or what your current directory is, etc. Mine displays a handful of
116116
things:
117117
118-
![My iTerm2 Status Bar]({filename}/static/imgs/statusbar.png)
118+
![My iTerm2 Status Bar]({static}/static/imgs/statusbar.png)
119119
120120
From a glance this shows me that my current battery is 72% charged, CPU is at
121121
18%, memory utilization is at 22GB, that it's currently January 31st at 10:59AM,
@@ -127,7 +127,7 @@ probably redundant since that's in my badge, but 🤷).
127127
You can configure your status bar by going to Profiles -> Session and clicking
128128
"Configure Status Bar". Here's a screenshot showing my settings:
129129
130-
![My iTerm2 Status Bar Settings]({filename}/static/imgs/statusbarsettings.png)
130+
![My iTerm2 Status Bar Settings]({static}/static/imgs/statusbarsettings.png)
131131
132132
I also configure the status bar to be at the bottom of the window (do this under
133133
Appearance -> General -> Status Bar Location)
@@ -141,18 +141,18 @@ Various other settings I turn on, mostly for minor conveniences or visual appeal
141141
I turn on transparency (Profiles -> Window -> Transparency). This is a setting
142142
I continually fiddle with. 😛
143143
144-
![Transparency settings]({filename}/static/imgs/transparency.png)
144+
![Transparency settings]({static}/static/imgs/transparency.png)
145145
146146
I also set these settings under Appearance -> Windows:
147147
148-
![Transparency settings]({filename}/static/imgs/appearancewindows.png)
148+
![Transparency settings]({static}/static/imgs/appearancewindows.png)
149149
150150
I like the border around the windows, and find the window number in title bar
151151
superfluous.
152152
153153
Under Appearance -> Tabs, I have:
154154
155-
![Transparency settings]({filename}/static/imgs/appearancetabs.png)
155+
![Transparency settings]({static}/static/imgs/appearancetabs.png)
156156
157157
### Oddball Conveniences
158158
@@ -162,7 +162,7 @@ opt out of beta releases.
162162
163163
Under General -> Selection, I have the following:
164164
165-
![Selection settings]({filename}/static/imgs/generalselection.png)
165+
![Selection settings]({static}/static/imgs/generalselection.png)
166166
167167
The big one on there for me is that I find the "Copy to pasteboard on selection"
168168
feature very annoying, so I turn it off.

0 commit comments

Comments
 (0)