- Sep 2021
-
docs.github.com docs.github.com
-
pbcopy < ~/.ssh/id_ed25519.pub
-
-
docs.github.com docs.github.com
-
Adding a new SSH key to your GitHub account
-
-
docs.newrelic.com docs.newrelic.com
-
Add a slack integration with New Relic.
-
- Aug 2021
-
docs.docker.com docs.docker.com
-
docker compose up
Deploy to AWS with docker compose.
Tags
Annotators
URL
-
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
Use method has() of relationship (more readable)
Use has if can't use join.
-
- May 2021
-
stackoverflow.com stackoverflow.com
-
:,$s/\vBEFORE/AFTER/gc
Search/replace from current line to end of file.
-
- Mar 2021
-
stackoverflow.com stackoverflow.com
-
Assuming you're using vue-router (and you probably should be), then you'll want to use the beforeRouteLeave guard. The documentation even gives an example of this exact situation: beforeRouteLeave (to, from , next) { const answer = window.confirm('Do you really want to leave? you have unsaved changes!') if (answer) { next() } else { next(false) } }
A nice example for how to prompt a user to save unsaved changes before changing routes.
-
-
stackoverflow.com stackoverflow.com
-
session.query(Book.author, Chapter.title).select_from(Book).join(Book.chapters) or session.query(Book).options(load_only("author"), joinedload("chapters").load_only("title"))
Very useful quick guide for how to only load certain foreign key fields.
-
-
vuex.vuejs.org vuex.vuejs.org
-
someGetter (state, getters, rootState, rootGetters) {
Note including all the parameters here is important. If you do not include all four and you want to use rootGetters for example:
someGetter (state, rootGetters) {
rootGetters will be getters because getters is the second argument passed to this function and so you will not actually be on the root scope but instead the local scope.
To access rootGetters in another name spaced module:
someGetter (state, getters, rootState, rootGetters) { let value = rootGetters["module-name/getterName"](param1);
-
-
openplotter.readthedocs.io openplotter.readthedocs.io
-
openplotter-settings_x.x.x-stable.deb
This is the filename of the open plotter. See here for details on which version you should use.
For example:
sudo dpkg -i openplotter-settings_2.6.2-stable_all.deb
-
After downloading the .deb file, you can install it by double click or typing this in a terminal:
You'll need to cd into the Downloads directory first.
-
- Feb 2021
-
www.myrecipes.com www.myrecipes.com
-
Really good bbq dry rub.
-
- Jan 2021
-
blog.logrocket.com blog.logrocket.com
-
github.com github.com
- Dec 2020
-
www.dinneratthezoo.com www.dinneratthezoo.com
Tags
Annotators
URL
-
- Sep 2020
-
arduino.stackexchange.com arduino.stackexchange.com
-
The .ino files are all combined together and presented to the compiler as a single .cpp file to compile. The Arduino libraries are compiled from source as well, and everything is linked into a binary.
This is why there are no includes for builtins like pinMode and digitalWrite.
-
-
github.com github.com
-
setup(); for (;;) { loop(); if (serialEventRun) serialEventRun(); }
The main of Sparkfun's Ardunio code. Note setup is called and then loop is called inside an infinite loop. setup is used for configuring pins, etc and loop is the actual program that is executed.
-
-
www.aspicyperspective.com www.aspicyperspective.com
-
www.gimmesomeoven.com www.gimmesomeoven.com
-
cup
-
- Jun 2020
-
stackoverflow.com stackoverflow.com
-
# scenario-1: delete in session: SA might set category_id of all chilren Products to None c1 = session.query(Category).get(1) session.delete(c1) session.commit() # scenario-2: delete without loading an object into the session: SA will perform no additional logic session.query(Category).filter(Category.id == 2).delete() session.commit()
Weird sqlalchemy behavior but totally an accurate statement. When using postgres and not specifying how to handle deletes, if you delete via object instead of filter.delete, sqlalchemy will set all children with foreignkey id's to None.
-
-
ljvmiranda921.github.io ljvmiranda921.github.io
-
Automate Python workflow using pre-commits: black and flake8
Super helpful how-to-guide for git pre-commit hooks.
-
-
flask-sqlalchemy.palletsprojects.com flask-sqlalchemy.palletsprojects.com
-
flask_sqlalchemy.get_debug_queries()
Dumps out query history-super helpful for debug!
-
-
stackoverflow.com stackoverflow.com
-
session_options={"autoflush": False, "autocommit": False, "expire_on_commit": False}
Disable autocommit and autoflush in sqlalchemy.
-
-
alembic.sqlalchemy.org alembic.sqlalchemy.org
-
Integration of Naming Conventions into Operations, Autogenerate
Importance of naming conventions for sqlalchemy when running alembic db migrations.
-
- Apr 2020
-
github.com github.comrq/rq1
-
def handle_exception(self, job, *exc_info):
To unit test an exception handler:
worker = Worker(..., exception_handler=[handle_exception]) try: raise Exception() except Exception: exc_info = sys.exc_info() worker.handle_exception(job, *exc_info)
-
-
www.youtube.com www.youtube.com
-
mkdocs for diagrams seems cool. :)
-
Tags
Annotators
URL
-
-
python-rq.org python-rq.orgRQ: Jobs3
-
failure_ttl
How long to keep a failed job.
-
result_ttl=600
How long to keep a successful job.
-
job.meta['handled_by'] = socket.gethostname() job.save_meta()
You can add metadata on the job like keeping track of the number of times a job has been retried for example.
Tags
Annotators
URL
-
-
python-rq.org python-rq.org
-
w = Worker([q], exception_handlers=[foo_handler, bar_handler])
Exception handlers are attached to the worker.
-
def my_handler(job, exc_type, exc_value, traceback): # do custom things here
Write an exception handler that requeues a failed job.
Tags
Annotators
URL
-
-
-
This explains how to use quicktime to record a presentation with embedded video.
-
-
developer.atlassian.com developer.atlassian.com
-
iamafoodblog.com iamafoodblog.com
-
Yolks
I added a 1/8 tsp vanilla extract for flavor.
-
cover and cook for 4-5 minutes
Do not uncover until they are ready otherwise they deflate.
-
-
superuser.com superuser.com
-
docker-compose rm -f -s -v yourService
useful commands for launching a single service in a docker-compose file without running it in the background so you can see the logs:
docker-compose rm -fsv service docker-compose up service
-
-
flask-sqlalchemy.palletsprojects.com flask-sqlalchemy.palletsprojects.com
-
flask-login.readthedocs.io flask-login.readthedocs.io
-
xvrdm.github.io xvrdm.github.io
-
db.session.remove()
-
-
flask.palletsprojects.com flask.palletsprojects.com
Tags
Annotators
URL
-
-
lesscss.org lesscss.org
-
-
www.w3schools.com www.w3schools.com
Tags
Annotators
URL
-
-
www.1001freefonts.com www.1001freefonts.com
Tags
Annotators
URL
-
-
it.vuejs.org it.vuejs.org
-
// _.debounce is a function provided by lodash to limit how // often a particularly expensive operation can be run. // In this case, we want to limit how often we access // yesno.wtf/api, waiting until the user has completely // finished typing before making the ajax request. To learn // more about the _.debounce function (and its cousin // _.throttle), visit: https://lodash.com/docs#debounce
Seems like it could be useful at some point.
-
Computed vs Watched Property
Really useful example of explaining what not to do and how to simplify code.
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
The components located under src/components are less likely to be used in a route whereas components located under src/views will be used by at least one route.
-
-
vuex.vuejs.org vuex.vuejs.org
-
Actions are asynchronous vs mutations which as synchronous.
-
- Mar 2020
-
www.youtube.com www.youtube.com
-
There's a really cool layout rendering video at 17:00.
-
-
-
www.youtube.com www.youtube.com
-
-
www.youtube.com www.youtube.com
-
-
archaeology-world.com archaeology-world.com
-
the stone of heaven is that this artifact is always found in soil layers dating to at least 12000 BC. The stone was certainly produced by an unknown, highly advanced civilization lost in time
-
Its composition was found to be composed of 77% oxygen, along with traces of carbon, silicon, calcium, and sodium.
-
-
www.youtube.com www.youtube.com
-
-
www.youtube.com www.youtube.com
-
-
thehorse.com thehorse.com
-
an abnormal noise from the upper airway might be audible during galloping, which usually is a sign that there is something amiss with the upper airway
-
-
www.youtube.com www.youtube.com
-
How to install an upper-mount duct venthood.
-
-
www.momontimeout.com www.momontimeout.com
-
3 tbsp lemon zest
Add this to this recipe and 2 drops of orange extract.
-
use a bit more if you like it sweeter
Add 2 extra tablespoons powdered sugar to balance the lemon juice.
-
3⁄4 cup mascarpone cheese sour cream
substitute 8oz cream cheese, 1/4 cup butter, 1/4 cup whipping cream
-
How To Make Devonshire Cream in Just 5 Minutes
Devonshire cream recipe.
-
Tags
Annotators
URL
-
-
www.allrecipes.com www.allrecipes.com
-
lemon custard recipe
-
-
vuex.vuejs.org vuex.vuejs.org
-
Instead of mutating the state, actions commit mutations. Actions can contain arbitrary asynchronous operations.
So for example an action may be a combination of mutation calls and async api calls.
-
-
www.youtube.com www.youtube.com
-
When you create a vue component you must give it a name:
<script> export default { name: "TodoItem", } </script>
-
The following binds a class on a condition in order to apply conditional styling:
<div class="todo-item" v-bind:class="{'is-complete':todo.completed}">
-
Styling can be scoped to just the component with the scope denotation below:
<style scope> </style>
-
When looping in the template the variable must be unique so we use v-bind:key and give it the id of the object as shown below:
<div v-bind:key="todo.id" v-for="todo in todos"> <h3>{{todo.title}}<h3>
-
Really nice vue plugin for chrome dev tools-looks like it's worth installing.
-
- Feb 2020
-
www.youtube.com www.youtube.com
-
-
www.avast.com www.avast.com
Tags
Annotators
URL
-
-
www.youtube.com www.youtube.com
-
-
www.vrbo.com www.vrbo.com
-
potential place to stay on oregon coast
-
-
www.vrbo.com www.vrbo.com
-
potential place to stay on oregon coast
-
-
www.meredithlodging.com www.meredithlodging.com
-
potential place to stay on oregon coast
-
-
www.youtube.com www.youtube.com
-
Dual boot a mac to windows.
Tags
Annotators
URL
-
-
developer.okta.com developer.okta.com
-
if you’re using user federation (things like single sign-on and OpenID Connect), JWTs become important because you need a way to validate a user’s identity via a third party.
-
If you’re building API services that need to support server-to-server or client-to-server (like a mobile app or single page app (SPA)) communication, using JWTs as your API tokens is a very smart idea.
-
If your website is popular and has many users, cache your sessions in a backend like memcached or redis, and you can easily scale your service with very little hassle.
-
in most web authentication cases, the JWT data is stored in a session cookie anyways, meaning that there are now two levels of signing. One on the cookie itself, and one on the JWT.
-
Almost every web framework loads the user on every incoming request. This includes frameworks like Django, Rails, Express.js (if you’re using an authentication library), etc. This means that even for sites that are primarily stateless, the web framework you’re using is still loading the user object regardless.
-
since JWTs are larger (in bytes) and also require CPU to compute cryptographic signatures, they’re actually significantly slower than traditional sessions when used in this manner.
-
This means that on most websites, the stateless benefits of a JWT are not being taken advantage of.
-
-
thoughtbot.com thoughtbot.com
-
Good explanation of how to convert to using react hooks with redux store.
Tags
Annotators
URL
-
-
www.fastcompany.com www.fastcompany.com
-
“Python is now the new glue language,”
I head this exact phrase at a Python meetup this week along with a slide
Python >= glue
.
-
- Jan 2020
-
redux.js.org redux.js.org
-
const mapStateToProps = state => ({ todos: getVisibleTodos(state.todos, state.visibilityFilter)})const mapDispatchToProps = dispatch => ({ toggleTodo: id => dispatch(toggleTodo(id))})export default connect( mapStateToProps, mapDispatchToProps)(TodoList)
Example of passing state to the component.
-
-
github.com github.com
-
npx create-react-app my-app
This builds out a nice template project to get started with all the tooling and setup already done for you.
Tags
Annotators
URL
-
-
www.thegreatcodeadventure.com www.thegreatcodeadventure.com
-
Instead of allowing any and all components to fetch and manipulate data, which can make debugging pretty much suck, we want to implement a pattern that's in line with the Single Responsibility Principle, and that keeps our code DRY.
-
-
github.com github.com
-
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
This worked for me when I ran into this issue in a virtualenv pip install.
-
-
stackoverflow.com stackoverflow.com
-
top -pid 123 -pid 836 -pid 654
How to filter top by process id on mac os.
-
- Dec 2019
-
www.bettycrocker.com www.bettycrocker.com
-
Sugar cookies.
-
-
www.bettycrocker.com www.bettycrocker.com
-
Gingerbread cookie recipe
Note if you are making a gingerbread house leave it in the oven for an extra 3-4 mins.
-
-
www.gimmesomeoven.com www.gimmesomeoven.com
-
Mulled Wine
Recipe for mulled wine.
Tags
Annotators
URL
-
-
github.com github.com
-
HTTPretty
Use this to mock the request object so that it will be easier to mock the request context manager.
Tags
Annotators
URL
-
-
github.com github.com
-
Using environment variables in nginx configuration
Tags
Annotators
URL
-
- Nov 2019
-
www.allrecipes.com www.allrecipes.com
-
Preheat oven to 425 degrees F. Whisk pumpkin, sweetened condensed milk, eggs, spices and salt in medium bowl until smooth. Pour into crust. Bake 15 minutes.
Whisk eggs and condensed milk in a pot on the stove at low-medium heat. Then add in spices and add pumpkin slowly. Reduce for about 15 min. Then pour into the pie crust and bake. My grandma always added in more sugar (1/4 cup brown & white) to make it sweeter. I also add in about 1/4 tsp cloves.
-
pumpkin pie recipie
-
-
github.com github.com
-
regex library for lua. The string.match doesn't support some characters such as
|
so we need to use a more complete set.
-
-
howtomakeanrpg.com howtomakeanrpg.com
-
t = { name = "Bob" } function t:sayHello() -- note the 't:' part print("Hello" .. self.name) end t:sayHello() -- "Hello Bob"
Implementing a class in lua.
Tags
Annotators
URL
-
-
github.com github.com
-
Nice example repo for lua.
-
lint: @luacheck -q .
We should probably run a lua linter at some point.
-
-
github.com github.com
-
-- patch os.getenv to not have existing environment variables interfere local _getenv = os.getenv os.getenv = function() end -- luacheck: ignore finally(function() os.getenv = _getenv -- luacheck: ignore end)
patch os.getenv
-
-
help.interfaceware.com help.interfaceware.com
-
Tip: If you see require('mymodule') it is just an alternative syntax for require 'mymodule' the two perform identically and are interchangeable.
-
Here is the code from main() using different variables, both work fine:
How to import and call a function in a module in lua. You can also use the local MM = require('mymodule') syntax.
-
This is the module, notice how the interface table mymodule is local and is returned on the last line of the module:
How to return functions from a module in lua.
-
-
github.com github.com
-
It's good practice to keep file loaded by content_by_lua_file at a minimum and place all processing logic into external modules. This allows lua_code_cache to work its magic and simplifies your testing.
Kinda counter intuitive but in a way it makes sense since require does built in caching and it makes it easier to test. This actually makes me feel a lot more comfortable making a utils area and just testing the functions in there.
-
-
www.lua.org www.lua.org
-
how require works in lua
-
-
developer.mozilla.org developer.mozilla.org
-
Content-Security-Policy
-
-
github.com github.com
-
Lake monsters github.
Tags
Annotators
URL
-
-
wpilib.screenstepslive.com wpilib.screenstepslive.com
-
Calibrating Speed Controllers
-
-
wpilib.screenstepslive.com wpilib.screenstepslive.com
-
template projects
-
-
github.com github.com
-
output = lustache:render("{{title}} spends {{calc}}", view_model)
This will return a string of the rendered template.
Tags
Annotators
URL
-
-
github.com github.com
-
1connect/nginx-config-formatter
Possible nginx config formatter.
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
import operator s = sorted(s, key = operator.itemgetter(1, 2))
Sort by multiple indexes.
-
to reverse to only one attribute, you can sort twice: first by the secondary s = sorted(s, key = operator.itemgetter(2)) then by the primary s = sorted(s, key = operator.itemgetter(1), reverse=True)
This makes sense, particularly from specification of sort order in Pandas, if I recall correctly you usually specify the primary last which makes me think on the backend implementation it does something similar to this where it sorts from the lowest priority to the highest priority.
-
-
www.youtube.com www.youtube.com
-
How to butterfly a lobster tail. Also remember to remove the the digestive vein. You can put squeeze a quarter lemon slice under the tail and use it to prop the meat up while it cooks.
-
-
lowrey.me lowrey.me
-
This looks similar to the other way of monkey patching the XMLHttpRequest and looks relatively straightforward.
-
-
stackoverflow.com stackoverflow.com
-
Possible monkey patching solution for XMLHttpRequests.
-
-
github.com github.com
-
Definitely used this config file for compiling on alpine.
-
-
lobsteranywhere.com lobsteranywhere.com
-
Whisk in 1 tbs. butter, when butter melts add another piece. Continuing adding butter pieces—1 cup (two sticks total.) Do not let the butter come to a boil or the butter will separate. Try to keep the butter between 160 and 175 degrees F. Use an instant read thermometer to to keep it under 180 F.
This is also a tasty way to cook lobster. Add garlic to the mix and make sure to add enough salt to the butter.
-
-
40aprons.com 40aprons.com
-
How to Broil Lobster Tails
This looks good.
-
-
www.allrecipes.com www.allrecipes.com
-
Add all ingredients to list
1 cup of blueberries
-
1 cup milk
.75 cup butter milk
-
5 teaspoons baking powder
4.5 teaspoons
-
3 cups all-purpose flour
2.25 cups
Tags
Annotators
URL
-
-
sallysbakingaddiction.com sallysbakingaddiction.com
-
Ingredient guide
Tags
Annotators
URL
-
-
docs.nginx.com docs.nginx.com
-
Make text substitutions in response bodies, using both regular expressions and fixed strings, in this filter module.
We need to use this. It's under nginx plus though so does that mean we have to pay for it/it doesn't work with regular nginx?
-
-
github.com github.com
-
nginx_substitutions_filter is a filter module which can do both regular expression and fixed string substitutions on response bodies. This module is quite different from the Nginx's native Substitution Module.
We might need to switch to this if we want to do replacement with regex's.
-
-
stackoverflow.com stackoverflow.com
-
This is a "protocol-relative" link. It uses http or https depending on what was used to load the current page.
So src="//…" means use the same scheme as the current page.
-
-
www.nginx.com www.nginx.com
-
http { proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g; server { location / { proxy_pass http://1.2.3.4; proxy_set_header Host $host; proxy_buffering on; proxy_cache STATIC; proxy_cache_valid 200 1d; proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; } } }
example proxy_cache config.
-
-
nginx.org nginx.org
-
Default: proxy_cache off;
So sounds like proxy caching is off by default.
-
Default: proxy_cache_lock off;
hmm...Ok this is off by default so probably not a bottleneck in that case.
-
Default: proxy_cache_lock_age 5s;
Again-seems like this should be a smaller timeout.
-
Default: proxy_cache_lock_timeout 5s;
This is a very long time! We should definitely shorten this. I actually wonder if this is perhaps why we are facing a bottleneck when we see a bunch of requests at once. When I performance tested, I ran without caching so it's possible the caching is actually bottlenecking us.
-
Sets an offset in bytes for byte-range requests. If the range is beyond the offset, the range request will be passed to the proxied server and the response will not be cached.
I don't see a need for this right now as it's not the range requests that are really the perceived slowness but it might be worth looking at later.
-
“GET” and “HEAD” methods are always added to the list, though it is recommended to specify them explicitly.
I wonder why?
-
If the value is set to off, temporary files will be put directly in the cache directory.
So use_temp_path should probably be set to off. I don't see a reason why we would need to first write them to a different directory.
-
Cached data that are not accessed during the time specified by the inactive parameter get removed from the cache regardless of their freshness. By default, inactive is set to 10 minutes.
This default seems like it should probably be set to minimally an hr-probably more. Cloudlflare is set at 4 hours which seems perfectly reasonable to me.
-
The special “cache manager” process monitors the maximum cache size set by the max_size parameter. When this size is exceeded, it removes the least recently used data.
So we might need to increase this?
-
Cache data are stored in files.
So it caches them on the file system by way of storing them in a temp file and renaming them. The default here says --. I thought nginx cached things by default so does this mean that's not the case or maybe it doesn't save them? Confused-need to investigate more.
-
Default: proxy_cache_min_uses 1;
This seems right for us.
-
The levels parameter defines hierarchy levels of a cache: from 1 to 3
Basically the same concept as a hardware cache with 1 I assume being the first cache that will be checked.
-
each level accepts values 1 or 2
I don't understand what this means.
Tags
Annotators
URL
-
- Oct 2019
-
www.analyticsmarket.com www.analyticsmarket.com
-
Really useful page for generating regexes of ip ranges. Note they are missing some parenthesis in places though.
Tags
Annotators
URL
-
-
nginx.org nginx.org
-
location / { sub_filter '<a href="http://127.0.0.1:8080/' '<a href="https://$host/'; sub_filter '<img src="http://127.0.0.1:8080/' '<img src="https://$host/'; sub_filter_once on; }
How to replace strings in an html response on-the-fly.
Note the Content-Type must be requested as not compressed for this to work.
Tags
Annotators
URL
-
-
serverfault.com serverfault.com
-
proxy_set_header Accept-Encoding "";
Note this is key to using sub_filter to replace strings in the response body.
-
-
github.com github.com
-
sysctls: net.ipv6.conf.all.disable_ipv6: 0
Possible solution for blocking ipv6 in docker.
Tags
Annotators
URL
-
-
www.nginx.com www.nginx.com
-
# request will be sent to backend without uri changed # to '/' due to if location /proxy-pass-uri { proxy_pass http://127.0.0.1:8080/; set $true 1; if ($true) { # nothing } }
This is a weird one. I guess as long as you aren't using $uri it has no impact though.
-
-
lua.2524044.n2.nabble.com lua.2524044.n2.nabble.com
-
Is anyone aware of a lua http lib that supports keepalive?
When sending a request you can pass the following keepalive settings which will keep the connection open:
local http = require "resty.http" local httpc = http.new() httpc:connect("127.0.0.1", 9081) local response, err = httpc:request({ path = "/proxy" .. ngx.var.request_uri, method = "HEAD", headers = ngx.req.get_headers(), keepalive_timeout = 60, keepalive_pool = 10, })
-
-
github.com github.com
-
Also, it's always a good idea to add ipv6=off to the resolver directive when your dns server may return IPv6 addresses and your network does not support it.
This might help.
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
Another difference about $uri and $request_uri in proxy_cache_key is $request_uri will include anchor tags part, but $uri$is_args$args will ignore it Do a curl operation : curl -I static.io/hello.htm
This could be a problem. We'll probably have to fix this when we move via2 outside lms.
-
-
clubhouse.io clubhouse.io
-
The proxy_buffering option tells NGINX to pass the response directly back to the client. Otherwise, it will try to buffer it in memory or on disk. I recommend this if the upstream response can be large.
We may want to not buffer on pdf endpoints.
-
-
www.ruby-forum.com www.ruby-forum.com
-
set $stripped_cookie $http_cookie; if ($http_cookie ~ "(.*)(?:^|;)\s*sessionid=[^;]+(.*)$") { set $stripped_cookie $1$2; } if ($stripped_cookie ~ "(.*)(?:^|;)\s*csrftoken=[^;]+(.*)$") { set $stripped_cookie $1$2; }
-
-
pandas.pydata.org pandas.pydata.org
-
Indicate number of NA values placed in non-numeric columns.
This is only true when using the Python parsing engine.
Filled 3 NA values in column name
If using the C parsing engine you get something like the following output:
Tokenization took: 0.01 ms Type conversion took: 0.70 ms Parser memory cleanup took: 0.01 ms
-
-
ci.ovationtix.com ci.ovationtix.com
-
Cabret theater Ashland plays. (dine and watch)
Tags
Annotators
URL
-
-
www.osfashland.org www.osfashland.org
-
calenda
Schedule for 2020 Ashland Plays.
-
-
serverfault.com serverfault.com
-
location / { proxy_pass http://backend; # You may need to uncomment the following line if your redirects are relative, e.g. /foo/bar #proxy_redirect / /; proxy_intercept_errors on; error_page 301 302 307 = @handle_redirect; } location @handle_redirect { set $saved_redirect_location '$upstream_http_location'; proxy_pass $saved_redirect_location; }
Usually the redirect is returned as the response and the client follows the redirect. This will follow a redirect inside nginx rather than the client.
-
-
docs.aws.amazon.com docs.aws.amazon.com
-
The X-Forwarded-Proto request header helps you identify the protocol (HTTP or HTTPS) that a client used to connect to your load balancer. Your server access logs contain only the protocol used between the server and the load balancer; they contain no information about the protocol used between the client and the load balancer.
The load balancer may talk to the server via http so using $scheme in nginx when there's an AWS load balancer in front may lead to the $scheme being unexpectedly http instead of https.
http { map $http_x_forwarded_proto $original_scheme { "" $scheme; default $http_x_forwarded_proto; } }
-
-
stackoverflow.com stackoverflow.com
-
I had a similar issue with nginx+passenger (for Ruby on Rails / Rack / etc.), and I confirm that by default, multiple slashes are collapsed (in both PATH_INFO and REQUEST_URI). Adding merge_slashes off; in the server context of the nginx configuration fixed it
-
-
openresty-reference.readthedocs.io openresty-reference.readthedocs.io
-
non-blocking internal requests
Note ngx.location.capture only works on internal requests which means if you want to request an external endpoint dynamically then you need to setup something like below and call that internal endpoint instead of calling the external url directly.
Say for example you want to send a request to / endpoint with the thirdparty url as part of the path (
http:proxy-server.com/http://example.com
).location /external/ { internal; set $upstream ""; rewrite_by_lua_file ./lua/get_external.lua; resolver 8.8.8.8; proxy_pass $upstream;
Where lua/get_external.lua:
-- strip beginning '/' from uri path ngx.var.upstream = ngx.var.request_uri:sub(2)
-
-
github.com github.com
-
set $template_root /usr/local/openresty/nginx/html/templates;
We should probably use this instead of root since root has other implications.
Tags
Annotators
URL
-
-
support.cloudflare.com support.cloudflare.com
-
Purging by single-file through your Cloudflare dashboard
This seems like the best way to purge files but I wonder if you can purge by domain or rather files rather than file.
-
-
github.com github.com
-
docker-openresty/alpine/Dockerfile.fat
openrestry nginx image that Hypothesis's new proxy-server is based on.
-
-
arstechnica.com arstechnica.com
-
an unexpected surge of traffic hitting the Space City Weather Web server
Yay unexpected spikes in traffic!
-
-
stackoverflow.com stackoverflow.com
-
# kill cache add_header Last-Modified $date_gmt; add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; if_modified_since off; expires off; etag off;
disable nginx caching
-
-
www.nginx.com www.nginx.com
-
Because it can handle a high volume of connections, NGINX is commonly used as a reverse proxy and load balancer to manage incoming traffic and distribute it to slower upstream servers – anything from legacy database servers to microservices.
-
Dynamic sites, built using anything from Node.js to PHP, commonly deploy NGINX as a content cache and reverse proxy to reduce load on application servers and make the most effective use of the underlying hardware.
-
With its event-driven, asynchronous architecture, NGINX revolutionized how servers operate in high-performance contexts and became the fastest web server available.
-
NGINX has grown along with it and now supports all the components of the modern Web, including WebSocket, HTTP/2, and streaming of multiple video formats (HDS, HLS, RTMP, and others).
-
NGINX consistently beats Apache and other servers in benchmarks measuring web server performance.
Tags
Annotators
URL
-
-
docs.pylonsproject.org docs.pylonsproject.org
-
pyramid_retry.is_error_retryable(request, exc)[source]¶ Return True if the exception is recognized as retryable error. This will return False if the request is on its last attempt. This will return False if pyramid_retry is inactive for the request.
Test if an error is retryable via pyramid_rety. Note it returns False on last attempt.
-
- Sep 2019
-
stackoverflow.com stackoverflow.com
-
use the REPOSITORY:TAG combination rather than IMAGE ID
Error response from daemon: conflict: unable to delete c565603bc87f (cannot be forced) - image has dependent child images
I really feel like this should be the accepted answer here but it does depend on the root cause of the problem. When you create a tag it creates a dependency and thus you have to delete the tag and the image in that order. If you delete the image by using the tag rather than the id then you are effectively doing just that.
-
-
passlib.readthedocs.io passlib.readthedocs.io
-
Passlib mitigates this by limiting the maximum password size to 4k by default.
Looks like MAX_PASSWORD size is set at 4k.
-
-
openresty-reference.readthedocs.io openresty-reference.readthedocs.io
-
This API function (as well as ngx.location.capture_multi) always buffers the whole response body of the subrequest in memory. Thus, you should use cosockets and streaming processing instead if you have to handle large subrequest responses.
So my interpretation of this is the request is issued, the entire response is buffered in memory, then res.headers is read from that buffer. I wonder if there is a way to cut off this buffer and close the connection early such that only the headers make it into the buffer for responses that are very large.
-
-
www.digitalocean.com www.digitalocean.com
-
Nginx, by default, will consider any header that contains underscores as invalid.
Interesting.
-
This is a really great introductory article to how nginx works. Definitely worth a read!
-
While buffering can help free up the backend server to handle more requests, Nginx also provides a way to cache content from backend servers, eliminating the need to connect to the upstream at all for many requests.
This seems like something we might want to look into long term but also I wonder whether this is really necessary. I thought nginx also cached responses by default so in that scenario I don't think it would even go out to the upstream server anyway, it would just return the previous still valid response but maybe I'm missing something.
-
-
stackoverflow.com stackoverflow.com
-
local LuaSocket = require("socket") client = LuaSocket.connect("example.com", 80) client:send("GET /login.php?login=admin&pass=admin HTTP/1.0\r\nHost: example.com\r\n\r\n") while true do s, status, partial = client:receive('*a') print(s or partial) if status == "closed" then break end end client:close()
How to issue an http request through a socket in lua.
-
-
www.glassdoor.com www.glassdoor.com
-
expensive. I pay almost 200 per paycheck for my family
This is a lot as opposed to Winco. See annotation.
-
-
www.glassdoor.com www.glassdoor.com
-
80/20. 45 dollars a month for a family of four. Low deductible.
That's a pretty good deal.
-
Insurance, Health & WellnessCheckmarkHealth Insurance (87)CheckmarkDental Insurance (23)CheckmarkFlexible Spending Account (FSA) (12)CheckmarkVision Insurance (23)Health Savings Account (HSA)CheckmarkLife Insurance (17)CheckmarkSupplemental Life Insurance (12)Disability InsuranceCheckmarkOccupational Accident Insurance (12)Health Care On-SiteCheckmarkMental Health Care (13)Retiree Health & MedicalCheckmarkAccidental Death & Dismemberment Insurance (16)Financial & RetirementPension PlanCheckmark401K Plan (83)CheckmarkRetirement Plan (77)Employee Stock Purchase PlanCheckmarkPerformance Bonus (9)CheckmarkStock Options (17)Equity Incentive PlanSupplemental Workers' CompensationCharitable Gift Matching
Winco benefits.
-
The health insurance here is about the best you will find. The company is employee owned, so you get stock(full stock ownership after 7 years). The benefits are pretty good - the only downside is the amount of vacation time and the ability to move up. It takes a lot of time to move up, and even in the high positions, you max out at four weeks of paid vacation after 15 years.
Seems like a pretty good summary.
-
Cheapest medical and dental insurance. Also you get stock every year and it adds and grows with you for your retirement. Starting pay is lower, but the stock and insurance makes up for it.
So maybe those benefits do make up for the $1 less in pay compared to Fred Meyer-at least this person thinks so.
-
-
www.glassdoor.com www.glassdoor.com
-
Fred Meyer offers employees a stock purchase plan. Stock options are available for some employees.
So I'm not sure if grocery employees have access to this but note it's purchasing stock as opposed to being gifted stock by the company which is what Winco does (although of course there is a vesting period at Winco).
-
-
www.glassdoor.com www.glassdoor.com
-
Stock option is called ESOP (Employee Stock Ownership Plan) and is the retirement plan WinCo gives all of its employees. Must be vested 5 years to receive 100% of stock.
Seems good.
-
-
www.glassdoor.com www.glassdoor.com
-
Insurance, Health & WellnessCheckmarkHealth Insurance (106)CheckmarkDental Insurance (27)Flexible Spending Account (FSA)CheckmarkVision Insurance (28)CheckmarkHealth Savings Account (HSA) (22)CheckmarkLife Insurance (21)Supplemental Life InsuranceCheckmarkDisability Insurance (22)CheckmarkOccupational Accident Insurance (19)Health Care On-SiteCheckmarkMental Health Care (20)Retiree Health & MedicalAccidental Death & Dismemberment InsuranceFinancial & RetirementCheckmarkPension Plan (29)Checkmark401K Plan (101)CheckmarkRetirement Plan (97)CheckmarkEmployee Stock Purchase Plan (20)Performance BonusCheckmarkStock Options (17)Equity Incentive PlanCheckmarkSupplemental Workers' Compensation (17)Charitable Gift Matching
Fred Meyer benefits.
-
Good health insurance, some 401k and HSA matching, vacation requests are not always accomodated
So they do have 401k and HSA and they have match-that's a plus but again might be job dependent.
-
7.5% bonus structure based on salary. Expensive health insurance for families. 3 weeks vac each year + floating holidays+4 personal days
Not sure what job this person had though.
-
-
www.glassdoor.com www.glassdoor.com
-
Benefits only take effect after 4 months employment for self, 10 months for family. This is an absurd arrangement that is unfair to employees.
hmm...
-
-
www.glassdoor.com www.glassdoor.com
-
Cashier - Hourly$11/hrRange: $9 - $1863 salaries$11/hr$9$1
Winco cashier pay is $11/hr. In general Winco is $1 less pay per hour than Fred Meyer but they also have stock and 401k benefits which is a huge plus although when you are making that little of income anyway do you really have money laying around to invest in those things anyways? Probably not would be my guess.
-