Skip to content

Instantly share code, notes, and snippets.

View gpessia's full-sized avatar
🏠
Working from home

gpessia gpessia

🏠
Working from home
View GitHub Profile
@gpessia
gpessia / opacity-st2-snippet.sublime-snippet
Created October 4, 2012 09:16
Cross Browser Opacity - Sublime Text Snippets
<snippet>
<content><![CDATA[
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:50})"; ${3:/* IE 8 */}
filter: alpha(opacity=${1:50}); ${3:/* IE 5-7 */}
-moz-opacity: ${2:0.5}; ${3:/* Netscape */}
-khtml-opacity: ${2:0.5}; ${3:/* Safari 1.x */}
opacity: ${2:0.5}; ${3:/* Good browsers */}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>opacity</tabTrigger>
@gpessia
gpessia / gist:2709785
Created May 16, 2012 11:50
iPad / iPhone on orientation change
window.onorientationchange = function(){
var orientation = window.orientation;
// Look at the value of window.orientation:
if (orientation === 0){
// iPad is in Portrait mode.
}
else if (orientation === 90){
// iPad is in Landscape mode. The screen is turned to the left.
}
else if (orientation === -90){
@gpessia
gpessia / more.md
Created April 21, 2012 16:17 — forked from vasilisvg/more.md
This is my backup script which syncs my server to my dropbox every day.

The script below is triggered every day from my Mac. I use Hazel to move the tar.gz to an external hard disk once it's finished. This happens every day without me noticing.

You should have a similar script.

@gpessia
gpessia / gist:2427969
Created April 20, 2012 11:45
Keymap - Bold & Italic for Markdown
[
// Sublime Text 2 Keymap - Bold & Italic for Markdown Syntax
{ "keys": ["super+shift+i"], "command": "insert_snippet", "args": {"contents": "*${SELECTION}*" },"context":[{"key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }]},
{ "keys": ["super+shift+b"], "command": "insert_snippet", "args": {"contents": "**${SELECTION}**" },"context":[{"key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }]}
]