- 入门教程:认识 React https://reactjs.org/tutorial/tutorial.html
- 重点理解 hooks API https://reactjs.org/docs/hooks-intro.html
- 学习一种 Router https://reactrouter.com/
| package main | |
| import ( | |
| "net/http" | |
| "compress/gzip" | |
| "io/ioutil" | |
| "strings" | |
| "sync" | |
| "io" | |
| ) |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
| for x in `git status -s|awk '{ print $2}'`; do gofmt -w $x; done |
Revised: 2019-11-28 16:16 GMT-6
This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.
I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # This script helps removing Git branches. | |
| # Run it from a git repo dir. It will open the Git branches list | |
| # in your favorite editor. Delete some branches from the list. | |
| # Save and close the file. The script applies the changes to the repo. | |
| from subprocess import call, Popen, PIPE | |
| from os import getenv |
| /*! | |
| * quantize.js Copyright 2008 Nick Rabinowitz. | |
| * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
| */ | |
| // fill out a couple protovis dependencies | |
| /*! | |
| * Block below copied from Protovis: http://mbostock.github.com/protovis/ | |
| * Copyright 2010 Stanford Visualization Group | |
| * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php |
| The MIT License (MIT) | |
| Copyright (c) 2016 Stuart Powers | |
| 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: |
| function uuid() { | |
| var uuid = "", i, random; | |
| for (i = 0; i < 32; i++) { | |
| random = Math.random() * 16 | 0; | |
| if (i == 8 || i == 12 || i == 16 || i == 20) { | |
| uuid += "-" | |
| } | |
| uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16); | |
| } |