Skip to content

Instantly share code, notes, and snippets.

@evuez
evuez / donutchart.py
Created December 17, 2014 12:23
Donut chart generator
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 = []
@evuez
evuez / piechart.py
Created December 17, 2014 12:18
Pie Chart Generator
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 = []
@evuez
evuez / responsive_triangle_mixin.scss
Last active August 29, 2015 14:10
Responsive triangle mixin (up / down)
// Triangle
@mixin triangle($dir, $size: 50%, $color: currentcolor) {
$base: null;
@if $dir == 'up' {
$base: bottom;
}
@else if $dir == 'down' {
$base: top;
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, " ")