Skip to content

Instantly share code, notes, and snippets.

@aisensiy
aisensiy / index.html
Created July 2, 2012 08:54 — forked from zoghal/index.html
Ember.Router
<!doctype html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src="http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script>
<script type='text/javascript' src="http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.js"></script>
</head><body>
<script type="text/x-handlebars" data-template-name="application">
<h1>Application</h1>
<a href="#/dashboard">Dashboard</a>
@aisensiy
aisensiy / index.html
Created August 13, 2012 02:16
Image popup snippet
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup,
@aisensiy
aisensiy / header.js
Created August 14, 2012 08:57
Javascript: show message for loading
define('HeaderView', [
'jquery',
'underscore',
'backbone',
'text!templates/header.html'
], function($, _, Backbone, tpl) {
var HeaderView;
HeaderView = Backbone.View.extend({
initialize: function() {
@aisensiy
aisensiy / hide_fix.js
Created August 15, 2012 08:34
Javascript: hide fix elements when add a big cover element on the page
var res = [];
/**
* Try to hide elements with style fixed
*/
function hide_fix() {
var possibilities = ['[style*="position:fixed"],[style*="position: fixed"]'],
searchFor = /\bposition:\s*fixed;/,
cssProp = 'position',
cssValue = 'fixed',
@aisensiy
aisensiy / script.js
Created August 16, 2012 06:45
Html: meiwei sigin form
setTimeout(function() {
$('input[name=email]').focus();
}, 500);
$('input[type=password]').keyup(function(e) {
if (e.keyCode === 13) {
$('#login-submit').click();
}
});
$('#cancel').click(function(e) {
e.preventDefault();
@aisensiy
aisensiy / Preferences.sublime-settings
Created September 4, 2012 06:37
sublime.settings
// Settings in here override those in "Default/Preferences.sublime-settings", and
// are overridden in turn by file type specific settings.
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_slow_plugins": false,
"rulers": [80],
"tab_size": 4,
"translate_tabs_to_spaces": true,
"ignored_packages": [],
"indent_to_bracket": true,
@aisensiy
aisensiy / gist:3618541
Created September 4, 2012 08:33
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@aisensiy
aisensiy / .vimrc
Last active October 10, 2015 04:58
vim config file
set nocompatible
filetype on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'honza/vim-snippets'
Bundle 'Shougo/neocomplcache'
"Bundle 'Shougo/neosnippet'
Bundle 'garbas/vim-snipmate'
@aisensiy
aisensiy / stop-google-redirect
Created December 8, 2012 15:06
[UserScript] stop google links redirect
// ==UserScript==
// @name google-noredirect
// @namespace tools
// @description stop google links redirect
// @include http://www.google.com*
// @include https://www.google.com*
// ==/UserScript==
(function() {
window.addEventListener('load', function() {
//package com.informit.poi;
// Import POI classes
import org.apache.poi.POIXMLDocument;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.POIXMLTextExtractor;
import org.apache.poi.hwpf.extractor.WordExtractor;
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.extractor.ExtractorFactory;