- Carefully do the official [tutorial][].
- Read the official guide to [main concepts][].
- Read the official [advanced guides][].
- Watch [building React from scratch][] to get an idea of how React actually works (this covers the "stack" reconciler which was used in React 15 and earlier).
- Go through the [React "fiber" architecture][] which is the default reconciler since React 16.
- Go crazy, build your own projects, and stop doing React tutorials!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
from time import sleep | |
def is_open(ip,port,timeout=5): | |
socket.setdefaulttimeout(timeout) | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
try: | |
s.connect((ip, int(port))) | |
s.shutdown(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install requirements with pipenv: | |
pipenv install -r requirements.txt | |
run python file in pipenv: | |
pipenv run python file.py | |
add manager so you can use migrations (using alembic) | |
initialize migration: | |
python manage.py db init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def titleizer(name) | |
name.split.map{ |part| part.split("-").map{ |p| p.capitalize }.join("-") }.join(" ") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string NumberToWords(long number) | |
{ | |
if (number == 0) | |
return "zero"; | |
if (number < 0) | |
return "minus " + NumberToWords(Math.Abs(number)); | |
string words = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#STEP 1 | |
CREATE EXTENSION IF NOT EXISTS hstore; | |
CREATE SCHEMA audit; | |
REVOKE ALL ON SCHEMA audit FROM public; | |
COMMENT ON SCHEMA audit IS 'Out-of-table audit/history logging tables and trigger functions'; | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run go docs locally: | |
godoc -http=:6060 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ping a group of servers called taapp: | |
ansible -i hosts taapp -m ping | |
run command, load from inventory: | |
ansible -i inventory all -m command -a "iptables -F" --become | |
send "ls" command to group taapp: | |
ansible taapp -m command -a "ls" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx create-react-app app-name --template typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
from dateutil.relativedelta import relativedelta | |
import numpy as np | |
class DynamicHorizontalContainmentField(QCAlgorithm): | |
def Initialize(self): | |
six_months_ago = date.today() + relativedelta(months=-6) | |
self.SetStartDate(six_months_ago) # Set Start Date | |
self.SetEndDate(date.today()) |
OlderNewer