An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| unset __messy_path | |
| unset __cleaned_path | |
| unset __path_check | |
| declare -A __path_check | |
| __messy_path+=(/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin /Applications/VMware\ Fusion.app/Contents/Library /Applications/Postgres.app/Contents/Versions/{9.3,9.4}/bin /{usr,opt}/{local,X11}/{bin,sbin} $HOME/bin) | |
| __messy_path+=($(IFS=:; echo $PATH)) | |
| __messy_path+=(/{usr,opt}/{bin,sbin} /{bin,sbin}) |
| #requires -version 2 | |
| <# | |
| .SYNOPSIS | |
| <Overview of script> | |
| .DESCRIPTION | |
| <Brief description of script> | |
| .PARAMETER <Parameter_Name> | |
| <Brief description of parameter input required. Repeat this attribute if required> |
| auth_basic "Restricted"; | |
| auth_basic_user_file /usr/local/etc/nginx/htpasswd; |
| import sys | |
| import location, time | |
| import urllib, webbrowser | |
| # Handle argument, if present. | |
| try: | |
| a = sys.argv[1] | |
| except IndexError: | |
| a = '' |
| <response><info><statusCode>0</statusCode><messages/><copyright><imageUrl>http://api.mqcdn.com/res/mqlogo.gif</imageUrl><imageAltText>© 2013 MapQuest, Inc.</imageAltText><text>© 2013 MapQuest, Inc.</text></copyright></info><route><sessionId>52a40dc1-0205-000c-02b7-04a6-d485645ba5f2</sessionId><options><shapeFormat>raw</shapeFormat><generalize>-1.0</generalize><maxLinkId>0</maxLinkId><narrativeType>text</narrativeType><stateBoundaryDisplay>true</stateBoundaryDisplay><countryBoundaryDisplay>true</countryBoundaryDisplay><sideOfStreetDisplay>true</sideOfStreetDisplay><destinationManeuverDisplay>true</destinationManeuverDisplay><avoidTimedConditions>false</avoidTimedConditions><enhancedNarrative>false</enhancedNarrative><returnLinkDirections>false</returnLinkDirections><timeType>0</timeType><routeType>FASTEST</routeType><locale>en_US</locale><unit>M</unit><tryAvoidLinkIds></tryAvoidLinkIds><mustAvoidLinkIds></mustAvoidLinkIds><manmaps>true</manmaps><drivingStyle>2</drivingStyle><highwayEfficiency>22.0</highwayEffi |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| ''' | |
| AWS S3 Gzip compression utility | |
| Author: Dmitriy Sukharev | |
| Modified: 2013-09-11 | |
| ------- | |
| Synchronizes directory with gzipped content of Amazon S3 bucket with local |
| # update_timezones.py | |
| # Aleksandr Pasechnik | |
| # | |
| # Goes through the Day One jounal and sets the Time Zone of each entry that | |
| # doesn't already have one to the value of the *timezone* variable. Makes a | |
| # backup copy of each entry it modified by adding a '.tzbak' to the filename. | |
| # Ignores any entry that already has a '.tzbak' version. | |
| # | |
| # NOTE: base_dir may need to be adjusted to the correct Journal_dayone location | |
| # NOTE: It is probably a good idea to have a full journal backup just in case |
| def shareSingleNote(authToken, noteStore, userStore, noteGuid, shardId=None): | |
| """ | |
| Share a single note and return the public URL for the note | |
| """ | |
| if not shardId: | |
| shardId = getUserShardId(authToken, userStore) | |
| if not shardId: | |
| raise SystemExit | |
| try: |
| auth_basic "Restricted"; | |
| auth_basic_user_file /etc/nginx/htpasswd; |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin