http://olivierlacan.com/posts/launch-sublime-text-3-from-the-command-line/
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Usage:
subl .
desc 'Create block stylesheet file and kitchen page' | |
task :create_block, [:name] do |t, args| | |
block_name = args[:name] | |
if block_name == nil | |
print "Block name is required \n" | |
else | |
# TODO Check name for convention validity ('my-super-block', not 'mySuper_block') | |
# Create stylesheet file | |
style_file_path = "#{Rails.root}/app/assets/stylesheets/blocks/_#{block_name}.scss" |
// Widget documentation http://www.jivosite.ru/javascript-api | |
function jivo_onLoadCallback() { | |
$('#online-consultant').addClass('enabled').click(function() { | |
jivo_api.open(); | |
}); | |
} | |
// scss |
# Make position 'fixed' useful for horizontal scroll | |
$header = $('.header') | |
$(window).scroll(()-> | |
$header.css('left', "-#{ $(window).scrollLeft() }px") | |
) |
var selectOptionsAsJSON = function(selectEl) { | |
var result = [], options = selectEl.options; | |
for (var i=0; i < options.length; i++) { | |
result.push({"text":options[i].text, "value":options[i].value}); | |
} | |
window.prompt('Done. Copy text:', JSON.stringify(result)); | |
return result; | |
} |
#!/bin/bash | |
# Originaly: https://github.com/jkaving/intellij-colors-solarized/blob/master/buildjar.sh | |
# Create the "colors" directory for the scheme files | |
# and copy all passed file there | |
mkdir colors | |
cp $* colors | |
# Create an empty "IntelliJ IDEA Global Settings" file, | |
# needed to be able to import the JAR using "Import Settings..." |
doctype html | |
<!--[if IE 8]> <html class="lt-ie10 lt-ie9" lang="ru"> <![endif]--> | |
<!--[if IE 9]> <html class="lt-ie10" lang="ru"> <![endif]--> | |
<!--[if gt IE 9]><!--> <html lang="ru"> <!--<![endif]--> | |
head | |
meta( charset="utf-8" ) | |
meta( http-equiv="X-UA-Compatible" content="IE=edge" ) | |
//- Uncomment it if your site is responsive | |
//- meta( name="viewport" content="width=device-width, initial-scale=1" ) | |
title Site title |
/* | |
snapToPixel.jsx | |
Adobe Illustrator script. | |
Moves any selected objects to the nearest pixel. | |
*/ | |
if ( documents.length > 0 ) { | |
var sourceDoc = activeDocument; |
#!/usr/bin/python | |
""" | |
(https://snipt.net/raw/f8ef141069c3e7ac7e0134c6b58c25bf/?nice) | |
Save this file as server.py | |
>>> python server.py 0.0.0.0 8001 | |
serving on 0.0.0.0:8001 | |
or simply |
// 1. Variant. Use existing pane element. Can overlay map objects like placemark, ballons. | |
// https://tech.yandex.ru/maps/doc/jsapi/2.0/ref/reference/map.pane.Manager-docpage/ | |
map.panes.get('events').getElement().style.backgroundImage = 'my/background/image.png'; | |
// 2. Variant. Create custom element. Pros: set z-index. | |
var patternEl = document.createElement('div'); | |
patternEl.className = 'map__pattern'; | |
myMap.panes.getInnerElement().appendChild(patternEl); | |
// then you add styles like: | |
// .map__pattern { |
http://olivierlacan.com/posts/launch-sublime-text-3-from-the-command-line/
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Usage:
subl .