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
| verifyCmd() { | |
| for cmd in ${@}; do | |
| if [ -z "$(which $cmd)" ]; then | |
| echo "$cmd not found in PATH: $PATH" | |
| return 1 | |
| fi | |
| done | |
| } | |
| : ${GOOGLE_BUCKET_ID?"Need to set GOOGLE_BUCKET_ID"} |
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 "stdio.h" | |
| int unique_1(char* str) { | |
| int count[256] = {0}; | |
| int i = 0; | |
| while(1) { | |
| char c = str[i]; | |
| if (c == '\0') return 1; | |
| if (count[c] > 0) { | |
| return -1; |
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
| // This code snippet demonstrates how to serialize/deserialize a struct | |
| // who has one or more date fields to/from JSON. | |
| // | |
| // Though, this example implements both encoding.TextMarshaler and json.JSONMarshaler, | |
| // either is necessary to format/parse time.Time in JSON format. | |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" |
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
| pip install mitmproxy |
NewerOlder