Skip to content

Instantly share code, notes, and snippets.

@danpe
danpe / HttpCookieParcelable.java
Created September 6, 2015 01:54
Efficient Presistent CookieStore for Android
/**
* Copyright 2015 Dan Peleg - https://github.com/danpe
* Based on http://codereview.stackexchange.com/q/61494/6732
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@danpe
danpe / Sublime Text 3 Contexts
Created October 28, 2013 00:45
Sublime Text 3 Contexts
Context Operands
auto_complete_visible: Returns true if the autocomplete list is visible.
has_next_field: Returns true if there’s a next snippet field available.
has_prev_field: Returns true if there’s a previous snippet field available.
num_selections: Returns the number of selections.
overlay_visible: Returns true if any overlay is visible.
panel_visible: Returns true if any panel is visible.
following_text: Restricts the test to the text following the caret.
preceding_text: Restricts the test to the text preceding the caret.
@danpe
danpe / Sublime Text 3 Commands
Created October 28, 2013 00:08
Sublime Text 3 Commands
A self made Sublime Text 3 Commands list.
build
run_macro_file
insert_snippet
insert
move
move_to
new_window
new_file
@danpe
danpe / Sublime Text 3 Environment Variables
Created October 15, 2013 18:56
Sublime Text 3 Environment Variables
List of all Sublime Text 3 Environment Variables to be used by Snippet Makers / Plugin Developers
$SELECTION The text that was selected when the snippet was triggered.
$TM_CURRENT_LINE Content of the line the cursor was in when the snippet was triggered.
$TM_CURRENT_WORD Current word under the cursor when the snippet was triggered.
$TM_FILENAME File name of the file being edited including extension.
$TM_FILEPATH File path to the file being edited.
$TM_FULLNAME User’s user name.
$TM_LINE_INDEX Column the snippet is being inserted at, 0 based.
$TM_LINE_NUMBER Row the snippet is being inserted at, 1 based.
@danpe
danpe / Sublime Text 3 Scopes
Last active April 4, 2018 17:30
Sublime Text 3 scopes to be used for Snippets Makers / Plugin Developers.
A list of Sublime Text 3 scopes to be used for Snippets Makers / Plugin Developers.
Main Symbol Scopes: entity.name.function, entity.name.type, meta.toc-list
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
BibTex: source.bibtex
C#: source.cs