See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"os" |
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
import discord | |
from discord.ext import commands | |
import sys, traceback | |
"""This is a multi file example showcasing many features of the command extension and the use of cogs. | |
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic | |
understanding and platform for creating your own bot. | |
These examples make use of Python 3.6.2 and the rewrite version on the lib. |
export default class CustomElement extends HTMLElement { | |
constructor() { | |
super() | |
this.$shadow = this.attachShadow() | |
this.$shadow.innerHTML = this.render() | |
} | |
connectedCallback() {} | |
disconnectedCallback() {} |
redis-cli monitor | grep -E ' "set" ' |
<script> | |
function execPolyfill() { | |
(function(){ | |
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1. | |
/* | |
Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | |
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
// This mixin might be used to extend a class with or without its | |
// own "foo" method | |
const mixin = Base => class extends Base { | |
foo() { | |
// Only call super.foo() if it exists! | |
if (super.foo) { | |
super.foo(); | |
} | |
console.log('mixin'); |
# Each subdivision can go down to 127 levels deep, and each DNS label can contain up to 63 characters, | |
# as long as the whole domain name does not exceed a total length of 255 characters. | |
class SubdomainValidator < ActiveModel::EachValidator | |
def validate_each(object, attribute, value) | |
return unless value | |
reserved_names = %w[admin beta blog ftp imap mail pop pop3 sftp smtp ssl www] | |
reserved_names += options[:reserved] if options[:reserved] | |
object.errors[attribute] << 'cannot be a reserved name' if reserved_names.include?(value.downcase) |