This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This document now exists on the official ASP.NET core docs page.
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
public class ScreenCaptureEditor : EditorWindow | |
{ | |
private static string directory = "Screenshots/Capture/"; | |
private static string latestScreenshotPath = ""; | |
private bool initDone = false; |
# https://github.com/mperham/sidekiq/blob/master/examples/systemd/sidekiq.service | |
# | |
# systemd unit file for CentOS 7, Ubuntu 15.04 | |
# | |
# Customize this file based on your bundler location, app directory, etc. | |
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu). | |
# Run: | |
# - systemctl enable sidekiq | |
# - systemctl {start,stop,restart} sidekiq | |
# |
# Download codeclimate test reporter | |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./codeclimate-test-reporter | |
chmod +x ./codeclimate-test-reporter | |
# Install dotnet tools to generate test report | |
dotnet tool install --global coverlet.console | |
dotnet add package coverlet.msbuild | |
# Start codeclimate process | |
./codeclimate-test-reporter before-build |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEngine.Tilemaps; | |
using System.IO; | |
public class CreateTilesFromTileset : EditorWindow | |
{ | |
int padding = 5; | |
int buttonHeight = 25; |
If your master.key has been compromised, you might want to regenerate it.
No key regeneration feature at the moment. We have to do it manually.
rails credentials:show
somewhere temporarily.config/master.key
and config/credentials.yml.enc
EDITOR=vim rails credentials:edit
in the terminal: This command will create a new master.key
and credentials.yml.enc
if they do not exist.config/credentials.yml.enc
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
[Unit] | |
Description=Sidekiq workers | |
# start as many workers as you want here | |
Wants=sidekiq@1.service | |
Wants=sidekiq@2.service | |
# ... | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/true |
# if you want to render flamegraphs | |
gem "stackprof", require: false # required by flamegraph | |
gem "flamegraph", require: false |