start new:
tmux
start new with session name:
tmux new -s myname
If you want your terminal vim to open files you double click, follow the following steps (MacOS only): | |
1. Open Automator | |
2. Select Application | |
3. Copy the attached file | |
4. Save and set as default for opening files | |
Multiple files are opened in vim tabs. | |
If there is already a vim instance running, files are opened in it. |
# .gitignore file for Xcode / AppCode projects | |
# based on https://github.com/github/gitignore/blob/master/Objective-C.gitignore | |
# Xcode | |
# | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 |
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).
After assigning the new database, I had two databases attached to the application. They looked something like this:
on run {input} | |
set filename to POSIX path of input | |
set cmd to "clear;cd $(dirname " & filename & ");nvim " & quoted form of filename & "; exit" | |
tell application "System Events" to set terminalIsRunning to exists application process "Terminal" | |
tell application "Terminal" | |
activate | |
if terminalIsRunning is true then | |
set newWnd to do script with command cmd | |
else | |
do script with command cmd in window 1 |
public func boot(_ app: Application) throws { | |
let config = URLSessionConfiguration.default | |
config.requestCachePolicy = URLRequest.CachePolicy.reloadIgnoringLocalCacheData | |
config.connectionProxyDictionary = [AnyHashable: Any]() | |
config.connectionProxyDictionary?[kCFNetworkProxiesHTTPEnable as String] = 1 | |
config.connectionProxyDictionary?[kCFNetworkProxiesHTTPProxy as String] = "proxy-server.com" | |
config.connectionProxyDictionary?[kCFNetworkProxiesHTTPPort as String] = 8080 | |
let session = URLSession.init(configuration: config) | |
Learning Rust
The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.
Warning
Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.
The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.
Our long term goal will be to use SSH over USB. This means that we have to configure Raspbian to treat the USB port like an ethernet port. Mount the micro SD card in a computer (not Pi Zero) and open it with Finder, or Windows Explorer, or whatever it is that you use.
The first thing that you want to do is open a file at the root of the mounted drive called config.txt. In this file you want to add the following line at the very bottom:
dtoverlay=dwc2
The above line will set us up for the next file that we alter. The next file we alter is cmdline.txt, but it is a bit different. Parameters in this file are not delimited by new lines or commas, they are delimited by space characters. In this file we want to add the following: