Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class SnapUtils | |
{ | |
[MenuItem("Tools/Megasnap")] | |
private static void Snap() | |
{ | |
GameObject[] rootObjects = SceneManager.GetSceneAt(0).GetRootGameObjects(); |
#!/usr/bin/env python3 | |
"""`cat` for Python 3. | |
- if a file has no newline at the end then the last line is merged | |
with the first line of the next file like `cat` does | |
- os.fsencode() is not used to encode error message therefore there | |
could be surrogates in the output (encoded using the default for | |
errors 'backslashreplace' error handler): it is always possible to | |
restore the original filename whatever (ascii-based) locale |
Log.d(TAG, "API CALL: POST "+url); | |
OutputStream output = null; | |
try { | |
String query = "furnail_name=hell&hi=2";//use URLEncode here | |
URLConnection connection = new URL("https://your-url.com/action/save").openConnection(); | |
String authString = "Basic " + Base64.encodeToString((username + ":" + password).getBytes(),Base64.NO_WRAP); | |
connection.setRequestProperty("Authorization", authString); | |
connection.setDoOutput(true); | |
connection.setRequestProperty("Accept-Charset", "UTF-8"); | |
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=" + "UTF-8"); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
''' | |
SimpleSecureHTTPServer.py - simple HTTP server supporting SSL. | |
- replace fpem with the location of your .pem server file. | |
- the default port is 443. | |
usage: python SimpleSecureHTTPServer.py | |
Credit: https://code.activestate.com/recipes/442473-simple-http-server-supporting-ssl-secure-communica/ | |
License: PSF License |