#published
## resources
#resources
## learning
#learning
## computer science
This file contains hidden or 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 subprocess | |
| from pathlib import Path | |
| from time import sleep | |
| # This script backs up iPhone photos to an Ubuntu computer. Plug the iPhone into the computer and | |
| # run this script on the computer after changing the two paths below. I forget how I found the | |
| # path of the photos on my phone, but part of the answer can be found online and the rest by | |
| # plugging in your phone and exploring with a terminal. If you're interested in this script, let me | |
| # know and I can make it much better. |
This file contains hidden or 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
| name: goreleaser | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: write |
This file contains hidden or 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
| { | |
| "Return err if it's not nil": { | |
| "prefix": "e?", | |
| "body": [ | |
| "${TM_CURRENT_LINE/^(\\s*e\\?)|(\\s*if .+)|(\\s*)/${1:+if }${2:+ }${3:+if }/}err != nil {", | |
| "\treturn${2} err", | |
| "}", | |
| ] | |
| } | |
| } |
This file contains hidden or 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
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v4.4.0 | |
| hooks: | |
| - id: check-yaml | |
| - id: end-of-file-fixer | |
| - id: trailing-whitespace | |
| - repo: https://github.com/psf/black | |
| rev: 23.9.1 | |
| hooks: |
This file contains hidden or 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
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Python: main.py (Integrated Terminal)", | |
| "type": "python", | |
| "request": "launch", |
This file contains hidden or 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
| #include <iostream> | |
| #include <math.h> | |
| using namespace std; | |
| int main() | |
| { | |
| // ***** | |
| for (int i = 0; i < 5; i++) | |
| cout << '*'; |
This file contains hidden or 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
| #include <iostream> | |
| using namespace std; | |
| struct Node { | |
| int value = 0; | |
| Node* next = NULL; | |
| Node(int new_value) { | |
| value = new_value; | |
| } | |
| }; |