Real unit test (isolation, no children render)
Calls:
- constructor
- static getDerivedStateFromProps
# onliner usage: | |
# bash <(curl -s https://gist.githubusercontent.com/makevoid/2be2170f17801c761aadfe7d9978b003/raw/89e833034594b2db34322810c619b936fb96b192/install-ruby-3-debian.sh) | |
set -xeuo pipefail | |
apt update -y | |
apt install -y build-essential git redis-server cmake vim wget curl libsqlite3-dev python3 apt-transport-https ca-certificates automake libtool libzlcore-dev libyaml-dev openssl libssl-dev zlib1g-dev libreadline-dev libcurl4-openssl-dev software-properties-common libreadline6-dev | |
mkdir -p ~/tmp |
from datetime import datetime | |
def datetime_to_cron(dt): | |
# FYI: not all cron implementations accept the final parameter (year) | |
return f"cron({dt.minute} {dt.hour} {dt.day} {dt.month} ? {dt.year})" |
""" | |
Copyright 2019 Jason Hu <awaregit at gmail.com> | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
Links: | |
https://elixir-lang.org/learning.html | |
https://exercism.io/tracks/elixir | |
https://github.com/happi/theBeamBook | |
https://www.manning.com/books/elixir-in-action |
# To connect this middleware.rb file to your sinatra app | |
# add 'use JWTAuthorization' as one of your first lines in | |
# your Application class. | |
# e.g. | |
# require 'middlewares.rb' | |
# class Application < Sinatra::Base | |
# use JWTAuthorization | |
# ... | |
# end |
{ | |
"title": "MacOS -> PC Shortcuts", | |
"rules": [ | |
{ | |
"description": "Top/bottom of document (ctrl+home/ctrl+end)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": <%= from("home", ["command"], ["any"]) %>, | |
"to": <%= to([["up_arrow", ["left_command"]]]) %>, |
# Do you like python named parameters (kvargs) ? | |
# Well, you can have it in bash too!! (but unfortunatly this will not allow you to mix positional and named parameters) | |
function myfunc() { local $*; echo "# foo=$foo, bar=$bar"; } | |
myfunc bar=world foo=hello | |
# foo=hello, bar=world | |
######### | |
# And with default arguments: |
Find the original article written by Swapnil Bhartiya here: http://www.muktware.io/arch-linux-guide-the-always-up-to-date-arch-linux-tutorial/
Download the latest ISO image of Arch Linux. Once you have downloaded the image it’s time to create a bootable USB drive. If you are on a Linux or Mac OS machine, you can use the ‘dd’ utility. If you are on a Windows system then you will have to use tools such as Rufus or USBWriter. If you have Cygwin installed on your Windows machine, then you can also use the ‘dd’