- XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"- JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"- JSON PUT
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
| -- This code comes from https://gist.github.com/oliveratgithub/ | |
| -- Open in AppleScript Editor and save as Application | |
| -- ------------------------------------------------------------ | |
| --this is required to break the filename into pieces (separate name and extension) | |
| set text item delimiters to "." | |
| tell application "Finder" | |
| set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list | |
| display dialog "New file name:" default answer "" | |
| set new_name to text returned of result | |
| --now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file. |
| -- This code comes from https://gist.github.com/oliveratgithub/ | |
| -- Open in AppleScript Editor and save as Application | |
| -- ------------------------------------------------------------ | |
| --this is required to break the filename into pieces (separate name and extension) | |
| set text item delimiters to "." | |
| tell application "Finder" | |
| set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list | |
| display dialog "New file name:" default answer "" | |
| set new_name to text returned of result | |
| --now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file. |
| $ curl --help | |
| Usage: curl [options...] <url> | |
| --abstract-unix-socket <path> Connect via abstract Unix domain socket | |
| --alt-svc <file name> Enable alt-svc with this cache file | |
| --anyauth Pick any authentication method | |
| -a, --append Append to target file when uploading | |
| --basic Use HTTP Basic Authentication | |
| --cacert <file> CA certificate to verify peer against | |
| --capath <dir> CA directory to verify peer against | |
| -E, --cert <certificate[:password]> Client certificate file and password |
| Network.shared.apollo.fetch(query: ListPersonQuery) { result in | |
| switch result { | |
| case .success(let graphQLResult): | |
| if let items = graphQLResult.data?.listPerson?.items { | |
| for conf in items { | |
| if let curPerson = conf { | |
| //Do whatever here with your Graphql Result | |
| print(curPerson) | |
| } | |
| } |
| import SwiftUI | |
| import PlaygroundSupport | |
| struct Screen: View { | |
| var body: some View { | |
| NavigationView { | |
| VStack { | |
| ScrollView (.vertical, showsIndicators: false) { | |
| SearchBar() | |
| Pins() |
| import SwiftUI | |
| import PlaygroundSupport | |
| struct Screen: View { | |
| var body: some View { | |
| VStack { | |
| ChatTopView() | |
| ConversationView() | |
| ChatBottomBar().padding(.bottom, 10) | |
| } |
| curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
| --header 'Accept: application/vnd.github.v3.raw' \ | |
| --remote-name \ | |
| --location https://api.github.com/repos/owner/repo/contents/path | |
| # Example... | |
| TOKEN="INSERTACCESSTOKENHERE" | |
| OWNER="BBC-News" | |
| REPO="responsive-news" |
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"| Key/Command | Description |
|---|---|
| Tab | Auto-complete files and folder names |
| Ctrl + A | Go to the beginning of the line you are currently typing on |
| Ctrl + E | Go to the end of the line you are currently typing on |
| Ctrl + U | Clear the line before the cursor |
| Ctrl + K | Clear the line after the cursor |
| Ctrl + W | Delete the word before the cursor |
| Ctrl + T | Swap the last two characters before the cursor |