This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
class RemoveNonBreakingCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
if self.view.settings().get("remove_non_breaking_space") == True: | |
non_breaking_space = self.view.find_all(u"\u00A0") | |
non_breaking_space.reverse() | |
for r in non_breaking_space: | |
self.view.replace(edit, r, " ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Triangle | |
@mixin triangle($dir, $size: 50%, $color: currentcolor) { | |
$base: null; | |
@if $dir == 'up' { | |
$base: bottom; | |
} | |
@else if $dir == 'down' { | |
$base: top; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import cos, sin, radians | |
def piechart(data, width=100, height=100): | |
center_x = width / 2 | |
center_y = height / 2 | |
radius = min([center_x, center_y]) - 5 | |
paths = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import cos, sin, radians | |
def piechart(data, width=100, height=100, stroke=40): | |
center_x = width / 2 | |
center_y = height / 2 | |
radius = min([center_x, center_y]) - 5 | |
paths = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
mongoid: | |
errors: | |
messages: | |
blank_in_locale: | |
"can't be blank in %{location}" | |
ambiguous_relationship: | |
message: "Ambiguous relations %{candidates} defined on %{klass}." | |
summary: | |
"When Mongoid attempts to set an inverse document of a relation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def lighten(color, scale=1.0): | |
""" | |
Lighten a color. | |
- color must be a tuple (r, g, b, a) | |
- scale can be any number, if < 1, color will be darkened | |
""" | |
return map( | |
lambda x: int(min(max(x * scale, 0), 255)), | |
color[:3] | |
) + list(color[3:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python 2 | |
def hex_to_rgb(hex_): | |
return unpack('BBBB', hex_.decode('hex')) | |
# Python 3 | |
def hex_to_rgb(hex_): | |
import codecs | |
return unpack('BBBB', codecs.decode(hex_, 'hex')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from shutil import move | |
from glob import glob | |
from os import path | |
from collections import Counter | |
HOME = '/home/evuez/' | |
RESERVED = ('QUEUED', 'TMP', 'DONE') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'#{:06x}'.format(random.randint(0, 0xffffff)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Settings in here override those in "Default/Preferences.sublime-settings", | |
// and are overridden in turn by file type specific settings. | |
{ | |
// Columns in which to display vertical rulers | |
"rulers": [78], | |
// Set to true to draw a border around the visible rectangle on the minimap. | |
// The color of the border will be determined by the "minimapBorder" key in | |
// the color scheme | |
"draw_minimap_border": true, |
OlderNewer