27 Mar 2015 ###TL;DR Check out the sample Get the great Meslo LG here
Add to CSS
@font-face {
font-family: 'Meslo LG S';
font-style: normal;
src: local('Meslo LG S'), local('Meslo LG S'),
url(http://inteist.com/public/fonts/MesloLGS-Regular.ttf)
format('truetype');
}
or
The Full Story
Goto Full Post 24 Mar 2015 Use Compress HTML Liquid plugin.
The size difference for this blog having ls | wc -l
=> 188 entries many of which are not too large was ~2Mb of generated HTML. Although most older posts are doubled to support the older /YYYY/MM/TITLE slug format. So roughly 350 posts and pages.
The setup literally takes about 30 seconds…
- download the plugin
- copy to your
_layouts
folder - in your main layout add a frontmatter
And you are done.
For more info visit the plugin’s documentation page
24 Mar 2015 A comprehensive way to reset a CSS element:
.reset-this {
animation : none;
animation-delay : 0;
animation-direction : normal;
animation-duration : 0;
animation-fill-mode : none;
animation-iteration-count : 1;
animation-name : none;
animation-play-state : running;
animation-timing-function : ease;
backface-visibility : visible;
background : 0;
background-attachment : scroll;
background-clip : border-box;
background-color : transparent;
background-image : none;
background-origin : padding-box;
background-position : 0 0;
background-position-x : 0;
background-position-y : 0;
background-repeat : repeat;
background-size : auto auto;
border : 0;
border-style : none;
border-width : medium;
border-color : inherit;
border-bottom : 0;
border-bottom-color : inherit;
border-bottom-left-radius : 0;
border-bottom-right-radius : 0;
border-bottom-style : none;
border-bottom-width : medium;
border-collapse : separate;
border-image : none;
border-left : 0;
border-left-color : inherit;
border-left-style : none;
border-left-width : medium;
border-radius : 0;
border-right : 0;
border-right-color : inherit;
border-right-style : none;
border-right-width : medium;
border-spacing : 0;
border-top : 0;
border-top-color : inherit;
border-top-left-radius : 0;
border-top-right-radius : 0;
border-top-style : none;
border-top-width : medium;
bottom : auto;
box-shadow : none;
box-sizing : content-box;
caption-side : top;
clear : none;
clip : auto;
color : inherit;
columns : auto;
column-count : auto;
column-fill : balance;
column-gap : normal;
column-rule : medium none currentColor;
column-rule-color : currentColor;
column-rule-style : none;
column-rule-width : none;
column-span : 1;
column-width : auto;
content : normal;
counter-increment : none;
counter-reset : none;
cursor : auto;
direction : ltr;
display : inline;
empty-cells : show;
float : none;
font : normal;
font-family : inherit;
font-size : medium;
font-style : normal;
font-variant : normal;
font-weight : normal;
height : auto;
hyphens : none;
left : auto;
letter-spacing : normal;
line-height : normal;
list-style : none;
list-style-image : none;
list-style-position : outside;
list-style-type : disc;
margin : 0;
margin-bottom : 0;
margin-left : 0;
margin-right : 0;
margin-top : 0;
max-height : none;
max-width : none;
min-height : 0;
min-width : 0;
opacity : 1;
orphans : 0;
outline : 0;
outline-color : invert;
outline-style : none;
outline-width : medium;
overflow : visible;
overflow-x : visible;
overflow-y : visible;
padding : 0;
padding-bottom : 0;
padding-left : 0;
padding-right : 0;
padding-top : 0;
page-break-after : auto;
page-break-before : auto;
page-break-inside : auto;
perspective : none;
perspective-origin : 50% 50%;
position : static;
/* May need to alter quotes for different locales (e.g fr) */
quotes : '\201C' '\201D' '\2018' '\2019';
right : auto;
tab-size : 8;
table-layout : auto;
text-align : inherit;
text-align-last : auto;
text-decoration : none;
text-decoration-color : inherit;
text-decoration-line : none;
text-decoration-style : solid;
text-indent : 0;
text-shadow : none;
text-transform : none;
top : auto;
transform : none;
transform-style : flat;
transition : none;
transition-delay : 0s;
transition-duration : 0s;
transition-property : none;
transition-timing-function : ease;
unicode-bidi : normal;
vertical-align : baseline;
visibility : visible;
white-space : normal;
widows : 0;
width : auto;
word-spacing : normal;
z-index : auto;
}
Source: StackOverflow
23 Mar 2015 To batch convert XML files to JSON a nodejs package can be used that does the job pretty well.
Install the package globally:
the format of the command is
xml-json input.xml root_node_to_start_from_in_xml
And so we use our friend inline loop with the basic command to batch process all the *.xml
files in the current folder
for f in *.xml; do xml-json $f root_node_name_here > $f.json; done
23 Mar 2015 Once your blog is generated, you can commit and push it to the origin to be deployed (if you are using Git as a deployment instrument of course)
The oneliner defaults to a _site
folder here in the example because this is what is usually used with the static site generators. Make sure to replace it with the correct path.
This also assumes that you are building the blog on your machine and are only pushing static files to the repository. You may want to do that to support custom plugins which Github’s version of Jekyll does not support because it runs with a --safe
flag on their servers
alias blog-delploy="cd ._site && git add -A && git commit -m 'blog-delploy UPDATE' & git push"
Here’s a bonus oneliner that is Jekyll specific to build and deploy the blog. Just adding the build command in front
alias blog-delploy="jekyll build && cd ._site && git add -A && git commit -m 'blog-delploy UPDATE' & git push"
Alternatively with zsh you can do it in a much nicer format
function blog-delploy() {
jekyll build &&
cd _site &&
git add -A && git commit -m 'blog-delploy UPDATE' &&
git push
}
23 Mar 2015 Put this into values
folder and use in your code by referencing us_states
.
<string-array name="us_states">
<item>Alabama</item>
<item>Alaska</item>
<item>American Samoa</item>
<item>Arizona</item>
<item>Arkansas</item>
<item>California</item>
<item>Colorado</item>
<item>Connecticut</item>
<item>Delaware</item>
<item>District of Columbia</item>
<item>Florida</item>
<item>Georgia</item>
<item>Guam</item>
<item>Hawaii</item>
<item>Idaho</item>
<item>Illinois</item>
<item>Indiana</item>
<item>Iowa</item>
<item>Kansas</item>
<item>Kentucky</item>
<item>Louisiana</item>
<item>Maine</item>
<item>Maryland</item>
<item>Massachusetts</item>
<item>Michigan</item>
<item>Minnesota</item>
<item>Mississippi</item>
<item>Missouri</item>
<item>Montana</item>
<item>Nebraska</item>
<item>Nevada</item>
<item>New Hampshire</item>
<item>New Jersey</item>
<item>New Mexico</item>
<item>New York</item>
<item>North Carolina</item>
<item>North Dakota</item>
<item>Northern Marianas Islands</item>
<item>Ohio</item>
<item>Oklahoma</item>
<item>Oregon</item>
<item>Pennsylvania</item>
<item>Puerto Rico</item>
<item>Rhode Island</item>
<item>South Carolina</item>
<item>South Dakota</item>
<item>Tennessee</item>
<item>Texas</item>
<item>Utah</item>
<item>Vermont</item>
<item>Virginia</item>
<item>Virgin Islands</item>
<item>Washington</item>
<item>West Virginia</item>
<item>Wisconsin</item>
<item>Wyoming</item>
</string-array>
22 Mar 2015 I have recently posted about how to throttle android emulator via custom networking parameters. However it may be quite tedious to type that every time we want to throttle the networking. Aliases to the help!
alias android-network-throttle="echo 'network delay 4000' | nc localhost 5554 && echo 'network speed 6 6' | nc localhost 5554"
alias android-network-reset="echo 'network delay 0' | nc localhost 5554 && echo 'network speed 0' | nc localhost 5554"
alias android-network-status="echo 'network status' | nc localhost 5554"
With ohmyzsh which will complete the aliases it’s pure delight.
22 Mar 2015 It is very easy to see the actual libraries that are used for your project. You just go to .idea
folder and then to libraries
folder where the actual libraries will reside.
