Skip to content

Instantly share code, notes, and snippets.

View gnrlbzik's full-sized avatar
🚀

Alesei N gnrlbzik

🚀
View GitHub Profile
@gnrlbzik
gnrlbzik / gist:4025253
Created November 6, 2012 15:02 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@gnrlbzik
gnrlbzik / gist:1140631
Created August 11, 2011 20:15
ui autocomplete - Stack Overflow Question
var serverSearchField = $("#txtSearchServer");
var listServers = [];
serverSearchField.autocomplete({
source: listServers
});
serverSearchField.keyup(function (event) {
$.ajax({
url: 'edit/EditService.svc/SearchServers',
@gnrlbzik
gnrlbzik / gist:987522
Created May 23, 2011 20:25
Sinatra App
# Project Folder Stracture
# ===============================
/mirteam-site/config.ru
/mirteam-site/favicon.ico
/mirteam-site/mirteam-sinatra-app.rb
/mirteam-site/README.markdown
# config.ru
@gnrlbzik
gnrlbzik / gist:977887
Created May 18, 2011 02:35
Sinatra Local Server for ruby script testing
# http://localhost:4567/
require 'rubygems'
require 'sinatra'
get("/*.rb") do
`ruby #{request.path_info.slice(1..-1)}`
end
@gnrlbzik
gnrlbzik / gist:971263
Created May 13, 2011 20:33
ruby method issue
# webrick.rb
require 'webrick'
WEBrick::HTTPUtils::DefaultMimeTypes['rhtml'] = 'text/html'
server = WEBrick::HTTPServer.new :Port => 3000, :DocumentRoot => Dir.pwd
trap 'INT' do server.shutdown end
server.start
@gnrlbzik
gnrlbzik / gist:969655
Created May 12, 2011 23:11
WEBRick server script
# WEBRick server code
# - reading file specified per path, servlet then dynamically loads file and erb interprets the code inside of the .rhtml.
require 'webrick'
include WEBrick
require 'erb'
WEBrick::HTTPUtils::DefaultMimeTypes['rhtml'] = 'text/html'
//SASS/COMPASS formatting i would like to have for organizational purpose.
#dashboard-content {
/*rule:value;*/
&.my-account-v2 {
/*rule:value;*/
.page {
/*rule:value;*/
.inner {
/*rule:value;*/
}