TL;DR: I explain how to detect TLS 1.0 connections and, by way of custom headers, warn the user about the coming change to more modern TLS versions.
| # Mixin | |
| class PermissionRequiredMixin: | |
| required_permissions = [] | |
| def route(self, request, path_components): | |
| if not request.user.has_perms(self.required_permissions): | |
| return RouteResult(self, kwargs={'permission_check_failed': True}) | |
| return super().route(request, path_components) |
| from django.core.serializers.json import DjangoJSONEncoder | |
| from django.template import Library | |
| from json import dumps as json_dumps | |
| register = Library() | |
| @register.filter | |
| def json(data): | |
| """ |
| # ---------------------------------- | |
| # Colors | |
| # ---------------------------------- | |
| NOCOLOR='\033[0m' | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| ORANGE='\033[0;33m' | |
| BLUE='\033[0;34m' | |
| PURPLE='\033[0;35m' | |
| CYAN='\033[0;36m' |
- Close Android File Transfer
- Open Activity Monitor and kill “Android File Transfer Agent”
- Go to where you installed “Android File Transfer.app” (I have it under /Applications)
- Ctrl+click –> “Show package contents”
- Go to Contents/Resources
- Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
- Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
How to update the list?
You need PHP 7.1+ and Composer.
-
Download composer.phar
-
Install the crawler
php composer.phar require "fabpot/goutte:^3.0"Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | |
| green='\033[0;32m' |
| #!/usr/bin/ruby | |
| =begin | |
| Usage: rtftomarkdown.rb FILENAME.rtf | |
| Uses textutil, available on Mac only (installed by default) | |
| Outputs to STDOUT | |
| Notes: | |
| Links are replaced with Markdown references (duplicate links combined). |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps