Skip to content

Instantly share code, notes, and snippets.

Avatar

Lighton Phiri lightonphiri

View GitHub Profile
View bash-install_google_fonts_on_ubuntu.md

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@lightonphiri
lightonphiri / shell-create_repos_terminal.txt
Created Sep 29, 2016
Creating Github and Bitbucket repositories via the terminal
View shell-create_repos_terminal.txt
# Creating new repositories via the terminal
## Github [1]
curl -u 'USERNAME' https://api.github.com/user/repos -d '{"name": "REPOSITORY-NAME", "description": "REPOSITORY DESCRIPTION", "private": true}'
## Bitbucket [2]
curl --user USERNAME https://api.bitbucket.org/1.0/repositories --data name='REPOSITORY-NAME' --data is_private='true'
## References
[1] https://developer.github.com/v3/repos/#create
View gist:5ef0ab11652d2a5921dba100ef792108
latex filename.tex
dvips -Pamz -Pcmz -o filename.ps filename.dvi
ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true \
-dEmbedAllFonts=true -dAutoFilterColorImages=false \
-dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode \
-dGrayImageFilter=/FlateEncode \
-dModoImageFilter=/FlateEncode filename.ps
View R-Sweave-batch_processing.sh
for file in *Rnw; do R CMD Sweave $file; done
@lightonphiri
lightonphiri / gist:0330a672f12edae2097c
Created Jan 8, 2015
[Blogpost Snippet@ lightonphiri.org] ggplot2 - Multiple Plots in One Graph Using gridExtra
View gist:0330a672f12edae2097c
# required libraries
require(ggplot2)
require(reshape2)
require(grid)
require(scales)
library(gridExtra)
# p1---plot #1
# Search Performance
p1dataset <- read.table("p1.dat", header=TRUE, sep=",")