snipplr api application in Mac OSX - code-snippets

I'm using snipplr.com and I want to use in my local Mac also. Do you know any free snippets application in Mac ? Ifound Snippets app but it is expensive for me. I want to save my snippet in my local Mac and also share on snipplr like Snippets app. If it can cloud like evernote , it's more better.

I'm using snippt now. I export all of the snippet from snipplr.com and import to the snippetapp.
http://en.saturngod.net/export-from-snipplrcom-to-files

Related

Using 'dart:io' in dartium ? Any work arounds?

I am new to dart and I am trying to read data from a file and use the contents to draw something canvas. In doing so I am running into 'The built-in library 'dart:io' is not available on Dartium ' issue.
I understand Dart has limitations as Javascript in that code that is running in a browser cannot natively access the File System of the running client.
At the same time are there any tips on how to read a file and also use the contents to write it to canvas?
Thanks in advance.
What kind of application are you trying to build?
If it runs in the browser the files are usually on the server.
If it is a normal web page you can't access user files. There is a sandboxed space accessible to be used by by the code of a webpage.
If you build something like a Chrome app you have less limitations.
You definitely can't import 'dart:io' when the could should run in the browser.
The APIs available in the browser can be found in 'dart:html'.
If you want to build a Chrome app this package provides access to the extended API http://pub.dartlang.org/packages/chrome
I fixed my problem by prompting the user to choose the file. Similar approach as in
https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications but using DART.

Print from command line across platforms

I have an appjs application that creates images but I need to print these images. I'm aware I could write a utility app in Adobe AIR which would do the print for me but I'm sure there is a way to open the target systems default print preview utility from a command line interface.
I have Googled and found lpr for the mac but I don't seem to be able to get this to work. I've tried
lpr /path/to/my/image.jpg
But this doesn't seem to work?
On Windows I can use
print /path/to/my/image.jpg
But I haven't tested this, is there a command available on the cli on both platforms that opens the system default print preview?
Even though you're using app.js could you still not use basic JS, like window.print();
I can confirm that using node-webkit directly is both MUCH easier and printing works.

isolated storage for windows phone 8?

i need to create isolated storage for my windows phone app, it is a business app that shows you all your business documents, and from there you can reject and accept the business documents, now what my problem is i have no idea where to start with isolate storage? i have been through google, but it does not make any sense, so if anyone can send me a link or tutorial it will be awesome, and how can i make the isolated storage in my app.xaml file so i can use it over and over again?
this is the link that gave me basic understanding , but it is all on buttonclick?
There is a pretty comprehensive example at the msdn page for isoloated storage file. If you need to double check some of the files that you've placed there, there is isolated storage explorer tool that comed with the sdk.
Have you tried IsoStoreSpy ? It supports both WP7 and WP8
It works well on my WP8 emulator, too
See here http://isostorespy.codeplex.com/
public static IsolatedStorageSettings appSetting = IsolatedStorageSettings.ApplicationSettings;
if (appSetting.Keys.Count == 0)
appSetting.Add("key",value);
if (appSetting.Keys.Count > 0)
appSetting.Remove("TEACHER");
if (appSetting.Contains("key"))
...

How to use Google Drive in a Java Desktop app?

I am dealing with mobile and desktop applications. I am trying to use Google Drive as a permanent storage folder. Unfortunately I am at a loss because I cannot find any examples. Can someone point me at an example of storing or retrieving a file from Google Drive?
I would really like to see a simple example in code or maybe a library which can handle this. I am stuck at Retrieve and Use OAuth 2.0 Credentials https://developers.google.com/drive/credentials
Did you look at the sample app on the drive API page?
edit
google moved the examples to github
I don't know if I figured out your problem. What I have understood is that you are looking for a way that makes you able to work on the same project from different computers.
If so, you simply have to download Drive. Once install it will ask you what folder you want to keep syncronized with Drive. If you select your workspace, it will be syncronized with Drive. So, on another pc, if you have installed Drive, you will be able to use the workspace folder too, with the same files.
I hope this is helpful.
Marco
You should look into Documents List API.
The Google Drive API & SDK are meant to be a mean to integrate applications into the Web-UI of Google Drive. To protect the security of the user's files, it puts some restrictions to the application developer, like:
The app has to be installed from the Chrome Web Store
The app can only access files created from the app itself,
or files selected by the user using the Google Picker UI.
All these restrictions make the Google Drive API not a good choice for most non-web applications.
E.g. installing the app from the Chrome Web Store is probably something you would find cumbersome to request from your users for a mobile or desktop application. Nonetheless, without being installed from the Chrome Web Store your application will always receive an error when accessing a file from Google Drive.
The Documents List API allows you to store and load files (not only Google Documents!) into Google Drive.
This question is a little bit old, still. You can look at this example: https://code.google.com/p/google-api-dotnet-client/wiki/OAuth2
They do the OAuth2 for accessing task. But I just used the same code to access the files using the v2 API. http://code.google.com/p/google-api-dotnet-client/wiki/APIs#Drive_API
I only retrieved the file list, but it is working (from .NET, desktop app).

Exporting files from a Javascript based phonegap app - options or ideas?

I'm currently writing a mobile app (hopefully iOS or android) using the jquery mobile framework and phonegap.
It'll need to export/send csv files in some way to the users, but I'd be interested to hear ideas or suggestions about the best way of doing so. If this can be done on the js side of the app that'd be ideal as it's what I'm most familiar with. A couple of options I've considered are:
Uploading the file using the google docs api
Writing the file to the file system (then export e.g. via iTunes)
I'm new to this so any suggestions gratefully received! Thanks for your help
There are a few options that you could use depending on how you want it to work.
The main options would be to
Use the File API (http://docs.phonegap.com/phonegap_file_file.md.html#File) to store files on the filesystem of the device.
Upload the file to a server using a standard XMLHttpRequest.
Write a native PhoneGap plugin on each platform that you are interested in that could connect to Google docs.
As Dave pointed out you can write files with the FILE API. I have used the file api on iOs to write custom log files and havent found any yikes so far.

Resources