A response to: Django: How to Log Users In With Their Email
There's an easier way than creating a custom user type. All you need to change is the AUTHENTICATION_BACKENDS
setting!
See the example account
app files in this gist!
Thanks!
A response to: Django: How to Log Users In With Their Email
There's an easier way than creating a custom user type. All you need to change is the AUTHENTICATION_BACKENDS
setting!
See the example account
app files in this gist!
Thanks!
const minute = 60; | |
const hour = minute * 60; | |
const day = hour * 24; | |
const week = day * 7; | |
const month = day * 30; | |
const year = day * 365; | |
/** | |
* Convert a date to a relative time string, such as | |
* "a minute ago", "in 2 hours", "yesterday", "3 months ago", etc. |
require 'json' | |
class GraphqlResponseRubyfier | |
def initialize(response) | |
@response = JSON.parse(response) | |
end | |
def rubyfy | |
rubyfied_response = to_o(@response) | |
puts(rubyfied_response) |
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
function ProviderComposer({ contexts, children }) { | |
return contexts.reduceRight( | |
(kids, parent) => | |
React.cloneElement(parent, { | |
children: kids, | |
}), | |
children | |
); | |
} |
<?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>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.17254902422428131</real> |
If you are using Python Shopify API
and getting following error
"Exceeded 4 calls per second for api client. Reduce request rates to resume uninterrupted service."
but want your script to continue working with some timeout after that,
you can use following script from shopify_limits_patch.py
.
For that just copy shopify_limits_patch.py
to your project and import shopify_limits_patch
.
Or if you want to call it implicitly import it, remove last line patch_shopify_with_limits()
and call it before all your shopify calls.
// @flow | |
import React from 'react'; | |
import styled from 'styled-components'; | |
type GlobalCssValues = 'initial' | 'inherit' | 'unset'; | |
type WrapValue = 'nowrap' | 'wrap' | 'wrap-reverse' | GlobalCssValues; | |
type JustifyValue = | |
| 'center' |
# This script checks the coverage and test if it keeps at least the same | |
# Add this to your .gitlab-ci.yml | |
# | |
# coveragetest: | |
# ... | |
# cache: | |
# paths: | |
# - coverage_value.txt | |
# script: | |
# - bin/coverage run bin/test |
This is the source for the scripts discussed in https://robots.thoughtbot.com/improving-user-experience-with-shell-scripts
Both scripts are in the bin/
directory of the repo that contains all the markdown documents for blog posts.
Users run bin/server
and everything is automatically set up for them to view a local preview of the blog.
bin/server-setup
is a dependency of bin/server
and is never run directly by users.
Maitre-d is the name of the "blog engine" discussed in the article.