Skip to content

Instantly share code, notes, and snippets.

View deoren's full-sized avatar
💭
I may be slow to respond.

Deoren Moor deoren

💭
I may be slow to respond.
View GitHub Profile
@deoren
deoren / pip.md
Last active January 23, 2018 03:54 — forked from saurabhshri/pip.md
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.

By: @saurabhshri

Why?

Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

@deoren
deoren / apt_pinning_priorities.md
Created December 13, 2017 17:36 — forked from JPvRiel/apt_pinning_priorities.md
Apt package pinning and priorities
@deoren
deoren / remote-git.md
Created December 18, 2017 20:30 — forked from Integralist/remote-git.md
Basic set-up of remote git repository on a standard server

Set-up remote git repository on a standard server

The first thing to do is to install Git on the remote server.

Once you do that the rest of the process is split into three sections:

  1. Server set-up
  2. Local set-up (push commits)
  3. Server (pull commits)
@deoren
deoren / progit2_setup_scratch_notes.txt
Last active February 6, 2018 03:21
Scratch notes for setting up/building Pro Git 2 book
sudo apt-get install build-essential curl git-core ruby ruby-dev zlib1g-dev ruby-bundler
git clone https://github.com/progit/progit2.git
cd progit2/
# Temp branch with Gemfile modified to use versions of gems that
# are known to generate valid epub output.
git checkout rework_files
@deoren
deoren / epubcheck_scratch.txt
Last active January 23, 2018 03:53
Scratch notes for fetching/using epubcheck
cd ~/dev
wget https://github.com/IDPF/epubcheck/releases/download/v4.0.2/epubcheck-4.0.2.zip
unzip epubcheck-4.0.2.zip -d epubcheck
cd ~/dev/rsyslog/rsyslog-doc
git stash
git fetch --all --prune --tags
git checkout master
sphinx-build -b epub source build
java -jar ~/epubcheck/epubcheck-4.0.2/epubcheck.jar build/rsyslog.epub
@deoren
deoren / git_log_options.md
Created January 14, 2018 09:04
Git log visualization tips

Git log visualization tips

Graph alongside the normal/detailed log output

This version lists a graph alongside the normal/detailed log output

git log --graph --abbrev-commit --decorate --date=relative --all

One liner with graph

git log --all --decorate --graph --oneline

@deoren
deoren / mk_mnt_img.sh
Created January 18, 2018 03:47
Create image file, format it and then mount it
#!/bin/bash
# Untested shell script to create and mount an image file. Pretty much a copy/paste
# from this site:
#
# http://ubuntuhak.blogspot.com/2012/10/how-to-create-format-and-mount-img-files.html
img_file="/tmp/bucket.img"
img_size_in_mb="1024"
mount_point="/tmp/bucket"
@deoren
deoren / using_git-svn.md
Last active August 13, 2023 01:01 — forked from rickyah/using_git-svn.md
A simple guide to git-svn

Getting started with git-svn

git-svn is a git command that allows using git to interact with Subversion repositories. git-svn is part of git, meaning that is NOT a plugin but actually bundled with your git installation. SourceTree also happens to support this command so you can use it with your usual workflow.

Reference: http://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion

Cloning the SVN repository

You need to create a new local copy of the repository with the command

@deoren
deoren / remove_ruby_gems.md
Last active January 23, 2018 03:52
Ubuntu: Prune ruby gems

Remove all ruby gems installed system-wide

What

Remove all gems

Why

Prepare to move away from system-installs of gems to vendor/bundle "packages"