NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Enable-RemoteDesktop | |
cinst fiddler4 | |
cinst git-credential-winstore | |
cinst console-devel | |
cinst sublimetext2 | |
cinst poshgit | |
cinst dotpeek |
# MIT License | |
# Copyright (c) 2018 Pavel Tsurbeleu and StaticPages Inc (staticpages.io) | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
#cloud-config | |
write_files: | |
- path: /etc/kontena-server.env | |
permissions: 0600 | |
owner: root | |
content: | | |
KONTENA_VERSION=latest | |
KONTENA_VAULT_KEY=ghV5TK5yl4zsfJlW4sWuhdPMc1ngLFAOzDYJwTSnjQpK096VWwDcTD5BKrV0ZyNZ | |
KONTENA_VAULT_IV=usPWA6tbnzdt0sjZI0eYFVaqZgk4pgQqOlPxrpGkOJcv9yHTRhpMW5N3ugKp7wHe | |
KONTENA_INITIAL_ADMIN_CODE=CoreOS999 |
class MyService | |
def send_request(number) | |
# calls an external service and might encounter an error | |
puts "... sending request ..." | |
end | |
def call_me_maybe(number) | |
begin | |
# first attempt | |
self.send_request(number) |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
Wonderful guide, very concise and actionable - https://gobyexample.com/hello-world | |
An official tour of Go, good but not great - https://tour.golang.org |
git log --oneline dev ^^feature |
// Builds human-readable representation of the specified object for debugging purposes. | |
function debugDescription(object: any, category: string): string { | |
var tuples = []; | |
for (var property in object) { | |
if (object.hasOwnProperty(property)) { | |
if (typeof object[property] === "object") { | |
tuples.push("'" + property + "': " + debugDescription(object[property], "")); | |
} else { | |
tuples.push("'" + property + "': '" + object[property] + "'"); | |
} |
<!-- SYNOPSIS: Sample HTML snippet from an imaginary UI extension that makes use of async validation --> | |
<!-- NOTE: This UI snippet will send an ajax request to ChangePassword/ValidatePasswordStrength uri to validate the users' input --> | |
<div> | |
<div id="changeMyPasswordForm"> | |
<div class="drawer-form-item"> | |
<label for="newPassword">New Password</label> | |
<div> | |
<input id="newPassword" name="newPassword" type="text" data-val="true" | |
data-val-length-min="6" data-val-length-max="64" | |
data-val-remote="enabled" |
// NOTE: For that code to work, you need install System.IdentityModel.Tokens.Jwt package from NuGet (the link includes the latest stable version) | |
// Link: https://www.nuget.org/packages/System.IdentityModel.Tokens.Jwt/4.0.2.206221351 | |
using System.IdentityModel.Tokens; | |
// a sample jwt encoded token string which is supposed to be extracted from 'Authorization' HTTP header in your Web Api controller | |
var tokenString = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8wMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJpYXQiOiIxNDI4MDM2NTM5IiwibmJmIjoiMTQyODAzNjUzOSIsImV4cCI6IjE0MjgwNDA0MzkiLCJ2ZXIiOiIxLjAiLCJ0aWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJhbXIiOiJwd2QiLCJvaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJlbWFpbCI6Impkb2VAbGl2ZS5jb20iLCJwdWlkIjoiSm9obiBEb2UiLCJpZHAiOiJsaXZlLmNvbSIsImFsdHNlY2lkIjoiMTpsaXZlLmNvbTowMDAwMDAwMDAwMDAwMDAw |