Skip to content

Instantly share code, notes, and snippets.

@ktsakalozos
ktsakalozos / refresh-certs.sh
Last active October 9, 2023 01:47
Refresh MicroK8s Certs
#!/bin/bash
set -eu
export SNAP_NAME="microk8s"
export SNAP_DATA="/var/snap/microk8s/current/"
export SNAP="/snap/microk8s/current/"
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH"
source $SNAP/actions/common/utils.sh
@sangeeths
sangeeths / github-to-bitbucket
Created March 10, 2014 15:24
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
@ppanyukov
ppanyukov / combinePdfFiles.tex
Created June 20, 2011 12:30
Combine several PDF files into one using LaTeX
% Many a time we have HTML articles published across multiple pages.
% And sometimes we want to print all those pages as one PDF.
% Here is how to do it:
% - Print into PDF from the browser into files like p01.pdf, p02.pdf etc
% - Use LaTeX to assemble these into one PDF.
%
% Here is the example. The \includepdf command supports scaling too,
% and I'm sure some other interesting commands as well.
%
% [copylifted from: http://yusung.blogspot.com/2007/02/combine-several-pdf-files-using-latex.html]