Examples for how to create your own info panel, warning box and other decent looking notification in GitHub markdown.
All the boxes are single/two cell tables or two row tables.
❗ You have to read about this |
---|
MORPHEUS: For the longest time, I wouldn't believe it. But then I saw the fields with my own eyes, watched them liquefy the dead so they could be fed intravenously to the living -
NEO (politely): Excuse me, please.
MORPHEUS: Yes, Neo?
NEO: I've kept quiet for as long as I could, but I feel a certain need to speak up at this point. The human body is the most inefficient source of energy you could possibly imagine. The efficiency of a power plant at converting thermal energy into electricity decreases as you run the turbines at lower temperatures. If you had any sort of food humans could eat, it would be more efficient to burn it in a furnace than feed it to humans. And now you're telling me that their food is the bodies of the dead, fed to the living? Haven't you ever heard of the laws of thermodynamics?
MORPHEUS: Where did you hear about the laws of thermodynamics, Neo?
Benchfella.start duration: 1.0#, format: :machine | |
defmodule StringDuplicateBench do | |
use Benchfella | |
@iterations [100, 1000, 10000, 100000] | |
Enum.each(@iterations, fn n -> | |
@str "1234567890" | |
@n n |
defmodule Stemmer do | |
def stem(word) do | |
IO.puts "stemming #{word}" | |
case Regex.run(~r/^(.+?)(ASD|QWE)$/u, word) do | |
[pattern_matching, like, "ASD"] -> IO.inspect like | |
[pattern_matching, like, "QWE"] -> IO.puts "whatever" | |
end | |
end | |
end |
defmodule Mix.TasksServer do | |
@moduledoc false | |
use GenServer.Behaviour | |
def start_link() do | |
:gen_server.start_link({ :local, __MODULE__ }, __MODULE__, :ok, []) | |
end | |
def clear_tasks() do | |
call :clear_tasks |
module ActiveRecord | |
class Connection | |
def connect | |
Thread.current.thread_variable_set(:connection_id, 123) | |
end | |
end | |
end | |
module Sequel | |
class Connection |
self.collectionView = ({ | |
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; | |
UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds | |
collectionViewLayout:flowLayout]; | |
collectionView.delegate = self; | |
collectionView.dataSource = self; | |
collectionView; |
// checks if already in current queue, prevents deadlock | |
void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_block_t block) { | |
if (dispatch_get_current_queue() == queue) { | |
block(); | |
}else { | |
dispatch_sync(queue, block); | |
} | |
} | |
// problem: |
defaults write "${TARGET_BUILD_DIR}"/"${CONTENTS_FOLDER_PATH}"/Info GitVersion `git describe --always --tags --dirty` |
class Exception | |
alias_method :_message, :message | |
def message | |
"#{_message}\t\n#{backtrace.join("\t\n")}" | |
end | |
end |