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
void CreateDatabase () | |
{ | |
_db = Manager.SharedInstance.GetExistingDatabase (DATABASE_NAME); | |
if (_db == null) | |
{ | |
var assembly = Assembly.GetCallingAssembly (); | |
var resourceName = assembly | |
.GetManifestResourceNames() | |
.Where (x => x.EndsWith("couchbase-connect.cblite")) |
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
{ | |
"type": "product-recommendations", | |
"product-id": "111", | |
"recommendations": [ | |
{ | |
"_id": "222", | |
"name": "Handy Hammer", | |
"min_price": 3.45, | |
"currency": "USD", | |
"quantity": { |
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
# Adapted from http://code.activestate.com/recipes/442473-simple-http-server-supporting-ssl-secure-communica/ | |
''' | |
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 | |
''' | |
import socket, os |
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
public void PutNPeople(Database db, int n) | |
{ | |
var lastNames = new[] { "Gramana", "Johnson", "Hunter", "Carter" }; | |
var firstNames = new[] { "Zack", "Bryan", "Greg", "Wayne" }; | |
for (int i = 0; i < n; i++) | |
{ | |
var doc = new Dictionary<string, object> | |
{ | |
{ "firstName", firstNames[i % 4] }, |
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
openssl x509 -outform der -in cert.pem -out cert.der |
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
# begin build properties | |
# autogenerated by buildinfo.sh | |
ro.build.id=JWR66N | |
ro.build.display.id=JWR66N | |
ro.build.version.incremental=711294 | |
ro.build.version.sdk=18 | |
ro.build.version.codename=REL | |
ro.build.version.release=4.3 | |
ro.build.date=Sat Jun 15 19:53:50 UTC 2013 | |
ro.build.date.utc=1371326030 |
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
#!/bin/bash | |
# Replace the old headers with the new ones. | |
# Find all csharp files, recursively. | |
# If it has an old header, remove it. | |
# Then insert the new header which includes | |
# the current file's name. | |
for file in $(find . -type f -name '*.cs'); do | |
fileName=${file##*/} # Split on the path char, and take the last segment. | |
headerStart='1i \ |
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
curl http://localhost:3000/socket.io/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
<DotNetProjectSubtype | |
guid="{e613f3a2-fe9c-494f-b74e-f63bcb86fea6}" | |
type="MonoDevelop.IPhone.IPhoneProject" | |
migrationHandler="MonoDevelop.IPhone.IPhoneProjectMigrationHandler" /> | |
<DotNetProjectSubtype | |
guid="{6bc8ed88-2882-458c-8e55-dfd12b67127b}" | |
type="MonoDevelop.IPhone.IPhoneProject" /> | |
<DotNetProjectSubtype | |
guid="{f5b4f3bc-b597-4e2b-b552-ef5d8a32436f}" | |
type="MonoDevelop.IPhone.IPhoneBindingProject" |
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
If you want to debug your Xamarin app using LLDB to get a backtrace, then do the following: | |
1) Clone https://github.com/zgramana/ios-deploy (or download https://www.dropbox.com/s/8fl1t1qc5fdg5tn/ios-deploy) | |
2) Run `make` inside that folder. | |
3) Run `./ios-deploy -d -b path/to/bin/iPhone/Debug/MyFoo.app` | |
This will install your app and start it will lldb attached. | |
From the lldb prompt: |