Skip to content

Instantly share code, notes, and snippets.

View thejeshgn's full-sized avatar

Thejesh GN thejeshgn

View GitHub Profile
@thejeshgn
thejeshgn / .block
Last active October 8, 2019 15:28 — forked from nbremer/.block
Radar Chart Redesign
height: 600
license: mit
@thejeshgn
thejeshgn / dev.py
Created July 10, 2017 09:00 — forked from JannieT/dev.py
Environment for scripting LibreOffice with Python
import uno
def getModel():
# get the uno component context from the PyUNO runtime
localContext = uno.getComponentContext()
# create the UnoUrlResolver
resolver = localContext.ServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver", localContext )
@thejeshgn
thejeshgn / text2png.py
Created January 25, 2017 12:25 — forked from destan/text2png.py
Python text to image (png) conversion with automatic new line calculation
# coding=utf8
import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
def text2png(text, fullpath, color = "#000", bgcolor = "#FFF", fontfullpath = None, fontsize = 13, leftpadding = 3, rightpadding = 3, width = 200):
REPLACEMENT_CHARACTER = u'\uFFFD'
NEWLINE_REPLACEMENT_STRING = ' ' + REPLACEMENT_CHARACTER + ' '
@thejeshgn
thejeshgn / index.html
Created November 5, 2016 01:38 — forked from rfriberg/index.html
Bells and Whistles
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bells and Whistles</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
<script src="https://mapzen.com/js/mapzen.min.js"></script>
<style>
#map {
height: 100%;
@thejeshgn
thejeshgn / index.js
Created October 4, 2016 14:57 — forked from l1kw1d/index.js
requirebin sketch
var insertCSS = require('insert-css')
var domify = require('domify')
var css = ".button { display: inline-block; font-family: Arial; background-color: papayawhip; padding: 10px; border: 1px solid salmon; }"
var html = '<div class="button">BUTTON</div>'
// inserts new <style> tag into the <head>
insertCSS(css)
// append the html elements that domify returns to the <body>
*.csv
.cache