Skip to content

Instantly share code, notes, and snippets.

View taylormonacelli's full-sized avatar

Taylor Monacelli taylormonacelli

View GitHub Profile
@taylormonacelli
taylormonacelli / emacs-pkg-install.sh
Last active March 7, 2019 23:59 — forked from padawanphysicist/emacs-pkg-install.sh
Install emacs packages from the command-line
#!/bin/bash
#
# I wrapped the code constructed in
#
# http://hacks-galore.org/aleix/blog/archives/2013/01/08/install-emacs-packages-from-command-line
#
# in a single bash script, so I would a single code snippet.
#
# Package to be installed
@taylormonacelli
taylormonacelli / VirtualBoxKickstart.md
Created October 21, 2018 20:28 — forked from jtyr/VirtualBoxKickstart.md
How to use kickstart in VirtualBox

How to use kickstart in VirtualBox

This short howto describes how to install VMs via kickstart in VirtualBox. It's using PXE functionality built into the NAT network mode of the VirtualBox. The following instructions apply to CentOS installation but it should work for any RedHat-based distro.

Prepare directory structure

@taylormonacelli
taylormonacelli / Rakefile
Last active May 2, 2017 18:45 — forked from rhass-r7/Rakefile
Rakefile task to edit and create Chef encrypted data bags for test fixtures.
require 'tempfile'
require 'chef/json_compat'
require 'chef/data_bag_item'
require 'chef/encrypted_data_bag_item'
require 'chef/encrypted_data_bag_item/check_encrypted'
include Chef::EncryptedDataBagItem::CheckEncrypted
# Usage Example:
# eval "$(chef shell-init bash)"

How to delete a file from a Git repository, but not other users' working copies

Suppose you have, by mistake, added your IDE's project folder (you know, these .idea folders with all kinds of local paths and configuration data and settings in it) to the Git repository of your project. (We're talking about a whole folder here, but the same rules apply to individual files as well.)

Of course, you only realize that two days after the fact and have already pushed it, and your colleagues have already pulled it. They use the same IDE as you do, so whenever they change a setting or fix paths, they can either

  • commit that, causing nasty merge conflicts for you and others or
  • ignore the changes and carry around a modified file until the end of time without ever committing it.

Why .gitignore won't help

FROM ubuntu
MAINTAINER Derek Hohls <dhohls@csir.co.za>
# make sure the package repository is up to date
RUN apt-get update
# general
RUN apt-get install -y gcc patch wget curl nano
# Install Subversion 1.8 and Apache
# Sets up
FROM ubuntu:precise
RUN apt-get update
# Install Subversion 1.8 and Apache
RUN apt-get install -y wget
RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
RUN sh -c 'echo "deb http://opensource.wandisco.com/ubuntu precise svn18" >> /etc/apt/sources.list.d/WANdisco.list'
/*
* Test
*/
function test(title, f, options) {
if (options == null) {
options = {
logTree: true
};
}
<root>
<spec-version>2</spec-version>
<package name="com.googlecode.windows-package-manager.Test">
<title>Test package</title>
<url>http://code.google.com/p/windows-package-manager/</url>
<description>An empty Npackd test package</description>
<icon>https://lh5.googleusercontent.com/-Clv-5HRjnqw/T2iH5F-IJYI/AAAAAAAAAbY/PRAIafxwI1c/s800/com.googlecode.windows-package-manager.Npackd.png</icon>
<license>org.gnu.GPLv3</license>
</package>
<version name="1" package="com.googlecode.windows-package-manager.Test">