The following was written to act as a Google Cloud Function or Lambda, and sends a simple POST to a standard rest endpoint at https://krypted.com/api/v1/sites with the json defined in jsonObject. The endpoint can easily be changed in http.NewRequest or converted to a variable. The response to the POST is then returned as stdout. package main import ( "fmt" "net/http" "encoding/json" ) func main() { // Create a new HTTP client. client := &http.Client{} // Create a new JSON object. jsonObject := map[string]string{ "name": "Krypted", "site": "www.krypted.com", } // Marshal the JSON object to a string. jsonString, err := json.Marshal(jsonObject) if err != nil { fmt.Println(err) return } // Create…
-
-
Employee trigger points you need to keep in mind as a business owner
It may sound like a cliché, but nothing is truer for business owners: You’re only as good as your employees. And because nothing’s ever easy, few challenges are more delicate than keeping valuable employees happy and motivated. To read more, see my post over at @inc at http://www.inc.com/charles-edge/10-things-you-should-do-to-keep-your-employees-happy-every-day.html
-
Listen To iOS Network Communications
OS X has a command called rvictl, which can be used to proxy network communications from iOS devices through a computer over what’s known as a Remote Virtual Interface, or RVI. To setup an rvi, you’ll need the udid of a device and the device will need to be plugged into a Mac and have the device paired to the Mac. This may seem like a lot but if you’ve followed along with a couple of the other articles I’ve done recently this should be pretty simple. First we’ll pair: idevicepair pair Then tap Trust on the device itself. Then we’ll grab that udid with idevice_id: idevice_id -l Next, we’ll…
-
Debugging Twitter
I was recently working on a new project developing against Twitter using their JSON interface. Turns out that the Twitter app has an awesome little feature to assist with such a task, a Console. To see the menu for the Console, enable the Develop menu, by putting a true boolean ShowDevelopMenu key into the com.twitter.twitter-mac.plist: defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true Once enabled, use the Develop menu to open Console. Here, you can select various buttons and see the GET, POST, PUT or DELETE sent. as well as the entities sent. To disable the Develop menu: defaults write com.twitter.twitter-mac ShowDevelopMenu -bool false
-
Using the CrashPlan Pro REST API
CrashPlan Pro Server is a pretty cool tool with a lot of great features that can be used to back up client computers. There are a lot of things that CrashPlan Pro is good at out of the box, but there are also a lot of other things that CrashPlan Pro wasn’t intended for that it could be good at, given a little additional flexibility. The REST API that CrashPlan Pro uses provides a little flexibility and as with most APIs I would expect it to provide even more as time goes on. I often hear people run away screaming when REST comes up, thinking they’re going to have to…