This file contains 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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
list_a := []string{"apple", "orange", "grapes"} | |
fmt.Println(list_a) | |
i := 1 |
This file contains 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
// Parse a conf.json file with this content: | |
// | |
// { | |
// "username": "YourUser", | |
// "password": "YourPassword" | |
// } | |
package main | |
import ( |
This file contains 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) | |
var url = flag.String("u", "", "URL to read") |
This file contains 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"strings" | |
) | |
var fileName = flag.String("f", "", "Filename to be read") |
This file contains 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
package main | |
import ( | |
"flag" | |
"fmt" | |
) | |
var hostName = flag.String("host", "localhost", "Hostname or IP you want to run this service on") | |
var portNumber = flag.Int("port", 8080, "Port you want this service to listen on (default 8080)") |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
type test_struct struct { | |
Test string |
This file contains 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
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
) | |
type Message struct { | |
Name string | |
Body string |
This file contains 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
color = 'Pink' | |
def refrain_one(): | |
print "%s it was love at first sight " % (color) | |
print "%s when I turn out the light, and " % (color) | |
print "%s gets me high as a kite " % (color) | |
print "And I think everything is going to be all right " | |
print "No matter what we do tonight " | |
print "" |
This file contains 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
if DEBUG: | |
EMAIL_HOST = 'localhost' | |
EMAIL_PORT = 1025 | |
EMAIL_HOST_USER = '' | |
EMAIL_HOST_PASSWORD = '' | |
EMAIL_USE_TLS = False | |
DEFAULT_FROM_EMAIL = 'testing@example.com' |
This file contains 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
class DisableCSRF(object): | |
def process_request(self, request): | |
setattr(request, '_dont_enforce_csrf_checks', True) |