Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Smenus
Smenus / git-rename-tag.sh
Created September 18, 2017 07:41
git-rename-tag
#!/bin/sh
# I think this is run TAG="oldtag" NEWTAG="newtag" sh git-rename-tag.sh
# It should keep the same date, committer and message as the original tag
fmt='
tagcommit=%(objectname)
tagname=%(taggername)
tagemail=%(taggeremail)
tagdate=%(taggerdate)
@Smenus
Smenus / git-submodule-split.sh
Created September 18, 2017 07:36
git-submodule-split
#!/bin/sh
#
# Split a repository into a submodule and main module, with history
#
# Copyright 2009 Trustees of Dartmouth College
# License: GNU General Public License, version 2 or later
# Gist taken from http://www.spinics.net/lists/git/msg94084.html
USAGE="[--url submodule_repo_url] submodule_dir [alternate_dir...]"
class ComboView extends Marionette.ItemView<ComboField>
{
/**
* Constructor logic for ComboView.
* @param {ComboField} model The model for the ItemView.
*/
constructor(model: ComboField)
{
this.ui = {
control: ".control-field input"
@Smenus
Smenus / msmtp inside initramfs
Last active August 29, 2015 14:22
msmtp Setup (Debian Jessie)
These are files I needed in order to get msmtp running inside my initramfs on Debian Jessie.
I encountered quite a few pitfalls while trying to get this set up, so I wanted to save them here for posterity.
@Smenus
Smenus / gist:6429316
Last active December 22, 2015 06:09
Remote Debian Installation with Encrypted RootFS

Remote Debian Installation with Encrypted RootFS

This is a quick run-down of how I installed Debian on my dedicated server (@ OVH - super cheap!), and managed to setup an encrypted rootfs with ssh during boot to unlock. This is both for the offchance that I'll have to do it again, and if anyone else is wanting to do the same thing. There are a few guides out there to get the unlocking over SSH, and a few for remote installation of Debian, but none that combine the two.

These instructions need an existing Debian install, although Ubuntu might work too.

1. Preparing Remote Installation

Source for this part of the guide was here

require 'formula'
class Libpar2 < Formula
url 'http://sourceforge.net/projects/parchive/files/libpar2/0.2/libpar2-0.2.tar.gz'
homepage 'http://parchive.sourceforge.net/'
sha1 '4b3da928ea6097a8299aadafa703fc6d59bdfb4b'
fails_with :clang do
build 421
cause <<-EOS.undent
--- libpar2-0.2-original/par2repairer.cpp 2006-01-20 17:25:00.000000000 +0000
+++ libpar2-0.2/par2repairer.cpp 2013-01-20 03:54:30.000000000 +0000
@@ -50,10 +50,12 @@
outputbuffer = 0;
noiselevel = CommandLine::nlNormal;
headers = new ParHeaders;
alreadyloaded = false;
+
+ cancelled = false;