See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
<?php | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_URL, 'https://myip.cpanel.net/v1.0/'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
$addr = curl_exec($curl); | |
curl_close($curl); | |
header('Location: https://verify.cpanel.net/app/verify?ip='.$addr, true, 303); | |
exit; |
import os | |
private let subsystem = "<ENTER-YOUR-SUBSYSTEM-STRING-HERE>" | |
// MARK: - Protocol | |
protocol LogProducer { | |
func debug(_ message: StaticString, _ messageArguments: CVarArg...) | |
func info(_ message: StaticString, _ messageArguments: CVarArg...) | |
func warn(_ message: StaticString, _ messageArguments: CVarArg...) |
package app | |
import ( | |
"log" | |
"net/smtp" | |
) | |
func SendMail(to, sub, body string) { | |
from := "[email protected]" | |
pass := "cfavhrbebdhqtyvq" |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
package main | |
import ( | |
"fmt" | |
"crypto" | |
"crypto/rsa" | |
"crypto/sha1" | |
"crypto/x509" | |
"encoding/base64" | |
"encoding/pem" |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
func main() { | |
b := []byte(`{"key":"value"}`) |
I was installing some python libraries that I needed, and this message came up: | |
Traceback (most recent call last): | |
File "/usr/bin/pip3", line 11, in <module> | |
sys.exit(main()) | |
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 215, in main | |
locale.setlocale(locale.LC_ALL, '') | |
File "/usr/lib/python3.5/locale.py", line 594, in setlocale | |
return _setlocale(category, locale) | |
locale.Error: unsupported locale setting |
// Package main is a sample macOS-app-bundling program to demonstrate how to | |
// automate the process described in this tutorial: | |
// | |
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 | |
// | |
// Bundling the .app is the first thing it does, and creating the DMG is the | |
// second. Making the DMG is optional, and is only done if you provide | |
// the template DMG file, which you have to create beforehand. | |
// | |
// Example use: |
// Node v6.9.0 | |
// | |
// TEST FILE (cut down for simplicity) | |
// To ensure Golang encrypted string can be decrypted in NodeJS. | |
// | |
let crypto; | |
try { | |
crypto = require('crypto'); |