-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTART_HERE
More file actions
121 lines (78 loc) · 3.49 KB
/
Copy pathSTART_HERE
File metadata and controls
121 lines (78 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
To enable SharedArrayBuffer, you need to add these headers to the
text/html files that are meant for the application logic.
If serving via "python -m http.server", look for the file named (something like):
/usr/local/lib/python3.13/http/server.py.
Then modify SimpleHTTPRequestHandler.send_head as such:
self.send_header("Content-type", ctype) # Old
self.send_header("Content-Length", str(fs[6])) # Old
self.send_header("Last-Modified", # Old
self.date_time_string(fs.st_mtime)) # Old
if ctype == "text/html": # New
print("*** Setting cross-origin headers on: " + path + " ***") # New
self.send_header("Cross-Origin-Opener-Policy","same-origin") # New
self.send_header("Cross-Origin-Embedder-Policy","require-corp") # New
self.end_headers() # Old
return f # Old
Shared link to "lotw" folder on Google Drive:
https://drive.google.com/drive/folders/1uhfaUmyHtsFCzDxMfI_VQrN8okLtJ_Na?usp=drive_link
A. After buying a new chromebook:
1) Put it in developer mode by typing: esc + refresh (F3) + power and
accepting the risks.
2) Install Chromebrew from: https://github.com/chromebrew/chromebrew
3) Create /usr/local/home
$ cd /usr/local && mkdir home
4) Make symlink from to /home/chronos/user/.bashrc from /usr/local/home.bashrc
$ cd /usr/local/home && ln -s /home/chronos/user/.bashrc .bashrc
5) Edit the .bashrc file and put the following line at the top:
export HOME=/usr/local/home
6) Near the bottom, put:
PATH=$PATH:~/bin:~/lotw/bin
7) For a plain, simple prompt, put:
PS1='\w\$ '
8) Set up aliases like:
alias nano='nano -x -U -T 4'
alias c='clear'
9) Source the .bashrc file:
. .bashrc
B. Workflow to create a github repo on a new chromebook
1) Go to github.com
Create github account: <USER>
2) If you want your repo to be statically served at the address:
https://<USER>.github.io, then create a public repo named
<USER>.github.io. (Otherwise, name it anything you want.)
This repo name is <REPO>.
3) Install the gh command:
crew install github_cli
4) Run these commands
gh auth login
git config --global user.email "whatever12345@gmail.com"
git config --global user.name "Slermerish Yooblex Jankister"
cd ~/yourproject
git init
git branch -m main
git remote add origin https://github.com/<USER>/<REPO>.git
So a static site repo will look like
git remote add origin https://github.com/cooluser/cooluser.github.io.git
Otherwise, it will just be:
git remote add origin https://github.com/myname/coolrepo.git
6) The following commands can be put into a script to automate the syncing of the
remote repo with the local project.
cd ~/yourproject
git add .
git commit -m "Blark"
git push -u origin main
7) For Node.js, check to see whether nodebrew is installed. If not, get it from:
https://github.com/hokaccha/nodebrew. Another option is nvm, node version manager:
https://github.com/nvm-sh/nvm. These projects are used to handle automatic updates
of your Node.js installation.
Create a ~/.node folder so that the Node.js packaging system will not clutter your
home directory.
mkdir ~/.node
Create a frontend script (called 'npi' or something) for npm like this:
echo 'npm install $@ --prefix ~/.node' > npi
chmod +x npi
Use it like so:
./npi some_node_package
Then you put it into a folder that is in your $PATH.
8) Edit ~/.bashrc and add the following line:
export NODE_PATH=~/.node/node_modules