- https://fishshell.com/ - my default shell, i use theme bobthefish
- https://www.sublimetext.com/ - my default editor
- Material Theme
- Operator font
- Packages: Emmet, Hayaku, SidebarEnhancements, JS Snippets, GSAP Snippets
- Sublime snippet for comments
- Sublime icon
- https://code.visualstudio.com/ - trying to switch, but not yet
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| # download 3.5.8 or neo4j-enterprise-4.0.0-alpha09mr02-unix | |
| !curl https://neo4j.com/artifact.php?name=neo4j-community-3.5.8-unix.tar.gz -o neo4j.tar.gz | |
| # decompress and rename | |
| !tar -xf neo4j.tar.gz # or --strip-components=1 | |
| !mv neo4j-community-3.5.8 nj | |
| # disable password, and start server | |
| !sed -i '/#dbms.security.auth_enabled/s/^#//g' nj/conf/neo4j.conf | |
| !nj/bin/neo4j start |
In your command-line run the following commands:
brew doctorbrew update
Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.
You can get all of this information on the command line.
rails generate with no generator name will output a list of all available generators and some information about global options.
rails generate GENERATOR --help will list the options that can be passed to the specified generator.
If you're running a Rails app in Google App Engine's flexible environment, it takes a bit of setup to get to a rails console attached to your deployed environment. I wanted to document the steps for my own reference and also as an aid to others.
-
Open the Google App Engine -> instances section of the Google Cloud Platform (GCP) console.
-
Select the "SSH" drop-down for a running instance. (Which instance? Both of my instances are in the same cluster, and both are running Rails, so it didn't matter for me. YMMV.) You have a choice about how to connect via ssh.
-
Choose "Open in browser window" to open a web-based SSH session, which is convenient but potentially awkward.
-
Choose "View
gcloudcommand" to view and copy agcloudcommand that you can use from a terminal, which lets you use your favorite terminal app but may require the extra steps of installing thegcloudcommand and authenticating thegcloudcommand with GCP.
-
| /* | |
| Open console. | |
| (Import https://raw.githubusercontent.com/MikeMcl/decimal.js/master/decimal.js first if you want/need number formatting) | |
| Then copy & paste this + enter, to run this. | |
| Copy console output to a NewFile.js or NewFile.jsx file. | |
| prettier --write NewFile.js | |
| */ | |
| /* eslint no-console: ["error", { allow: ["log"] }] */ | |
| /* global document, Decimal*/ | |
| (() => { |
Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.
- [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
[UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached[UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead[UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
A quickstart guide for getting a React.js client running with a Rails API, both hosted on Heroku. Topics Covered:
- Creating a Rails API and deploying to Heroku
- Creating a React app using create-react-app and deploying to Heroku
- Configuring React app to speak to local host / Heroku instance of API automatically
This is a very quick run down so it is assumed that you have a basic understanding of Unix, Node, NPM, Rails and React. It is also assumed that you have Ruby, Node and NPM installed already.
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/