Skip to content

Instantly share code, notes, and snippets.

View shankarcabus's full-sized avatar
💭
Hello world :)

Shankar Cabus shankarcabus

💭
Hello world :)
View GitHub Profile
#!/bin/bash
echo "Restarting VirtualBox"
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
echo "Starting vagrant [lb, webnode, testsuite]"
cd ~/git/jusbrasil-webpy/resources
vagrant halt -f; vagrant up
echo "Activating virtualenv"
.selector,
.selector-secondary,
.selector[type="text"] {
padding: 15px;
margin-bottom: 15px;
background-color: rgba(0,0,0,.5);
box-shadow: 0 1px 2px #ccc, inset 0 1px 0 #fff;
}
.selector, .selector-secondary, .selector[type=text] {
padding:15px;
margin:0px 0px 15px;
background-color:rgba(0, 0, 0, 0.5);
box-shadow:0px 1px 2px #CCC,inset 0 1px 0 #FFFFFF
}
@shankarcabus
shankarcabus / Preferences.sublime-settings.json
Last active December 17, 2015 21:09
My User Settings of Sublime Text 3
{
"auto_complete": true,
"caret_style": "phase",
"close_windows_when_empty": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"find_selected_text": true,
"fold_buttons": false,
"folder_exclude_patterns":
[
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
/** MIT License
*
* KeySpline - use bezier curve for transition easing function
* Copyright (c) 2012 Gaetan Renaudeau <renaudeau.gaetan@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
@shankarcabus
shankarcabus / checkall.js
Created June 18, 2013 01:54
Check all in Facebook event
checkboxes=document.getElementsByName("checkableitems[]");for(var i=0,n=checkboxes.length;i<n;i++){checkboxes[i].checked=true}
[
{ "keys": ["super+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["super+shift+o"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["super+shift+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["super+3"], "command": "find_under_expand" },
{ "keys": ["super+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["super+b"], "command": "toggle_side_bar" },
{ "keys": ["super+ctrl+b"], "command": "build" },
var dialog = document.createElement('div'),
ie6Launch = 2001,
ie7Launch = 2006,
currentYear = new Date().getFullYear(),
ieVersion = head.browser.version,
timeAgo = ieVersion <= 6 ? currentYear - ie6Launch : currentYear - ie7Launch;
dialog.className = 'dialog-fixed browsers';
dialog.innerHTML = '\
<div class="out-box"> \
// how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
// how could this code be rewritten in order to remove the if?
if (foo) {
bar.doSomething();
@shankarcabus
shankarcabus / upload.html
Last active December 26, 2015 18:39
Upload image with crop
<div class="add-offer-field-image">
<div class="add-offer-upload-image">
<input class="add-offer-field-file" type="file" name="image">
Adicionar imagem<i class="icon-picture"></i>
</div>
<div class="add-offer-image-preview">
<img src="" alt="">
</div>
</div>