Skip to content

Instantly share code, notes, and snippets.

View lightonphiri's full-sized avatar

Lighton Phiri lightonphiri

View GitHub Profile
@lightonphiri
lightonphiri / bash-install_google_fonts_on_ubuntu.md
Last active April 19, 2024 18:44
Install Google Fonts on Ubuntu

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 September 29, 2016 10:33
Creating Github and Bitbucket repositories via the terminal
# 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
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
@lightonphiri
lightonphiri / R-Sweave-batch_processing.sh
Created January 6, 2016 13:50
R Seave batch processing
for file in *Rnw; do R CMD Sweave $file; done
@lightonphiri
lightonphiri / gist:0330a672f12edae2097c
Created January 8, 2015 07:59
[Blogpost Snippet@ lightonphiri.org] ggplot2 - Multiple Plots in One Graph Using gridExtra
# 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=",")