Skip to content

Instantly share code, notes, and snippets.

View mongoltolbo's full-sized avatar

Lkhamsuren Amarjargal mongoltolbo

View GitHub Profile
#!/usr/bin/python
import sys
import fontforge
if len(sys.argv) < 3:
print("Usage: %s <from> <to>" % sys.argv[0])
sys.exit(1)
fromfile = sys.argv[1]
import fontforge
font = fontforge.open("/usr/share/fonts/truetype/ttf-malayalam-fonts/Meera_04.ttf", 4)
print "Glyphs"
for (i,g) in enumerate(font.glyphs()):
print "%s\t%s\t%s\t%s\t%s\t%s\t%s"%(i,g.glyphname,g.glyphclass,g.script,g.encoding,g.unicode,g.getPosSub("*"))
print "GSUB Lookups"
for (i,g) in enumerate(font.gsub_lookups):
print "%s\t%s"%(i,g)
print "GPOS Lookups"
for (i,g) in enumerate(font.gpos_lookups):
for i in *.svg; do inkscape -f "$i" -e "$i.png"; done
@mongoltolbo
mongoltolbo / gist:7817988
Created December 6, 2013 03:13
Horizontally and vertically
.parent { position: relative; }
.child {
position: absolute;
left: 50%;
top: 50%
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
@mongoltolbo
mongoltolbo / Change Text Selection and Highlight Color
Created December 24, 2013 03:18
Change Text Selection and Highlight Color
::selection {
background: #E599FF; /* Safari */
}
::-moz-selection {
background: #E599FF; /* Firefox */
}
@mongoltolbo
mongoltolbo / css3 marquee
Created December 24, 2013 03:28
css3 marquee
<p class='marquee'>wow css3 marquee fun!</p>
p.marquee{
-webkit-animation-name: marquee;
-webkit-animation-timing-function: linear;
-webkit-animation-duration:10s;
-webkit-animation-iteration-count: infinite;
margin: 0;
padding: 0;
overflow: hidden;
@mongoltolbo
mongoltolbo / NVIDIA Ubuntu
Created April 9, 2014 03:31
NVIDIA Ubuntu
sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings
@mongoltolbo
mongoltolbo / full image background
Created June 11, 2014 21:51
full image background
.section.header {
background-color: white;
background-position: center bottom,center top;
background-size: auto,cover;
background-image: url(https://slack.global.ssl.fastly.net/20651/img/tour/header_arrow.png);
background-repeat: no-repeat;
text-shadow: 0 1px 1px rgba(0,0,0,0.5);
min-height: 550px;
position: relative;
}
@mongoltolbo
mongoltolbo / Linux : Restart PHP Service Command
Created May 10, 2016 07:14
Linux / Unix: Restart PHP Service Command
/etc/init.d/apache2 restart
@mongoltolbo
mongoltolbo / grav.html
Created May 10, 2016 22:51
How to install PHP to run Grav CMS under Linux
:~$ sudo apt-get install php5
That will install the latest available release of the PHP package. Next, you should verify the version running the following command:
:~$ php -v
Be sure you get at least the 5.4 release, otherwise Grav will not work.
PHP 5.6.4-4ubuntu6.2 (cli) (built: Jul 2 2015 15:29:28)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies