Skip to content

Instantly share code, notes, and snippets.

View roidelapluie's full-sized avatar
🔥

Julien roidelapluie

🔥
  • O11y
View GitHub Profile
create_resources("mail::domain", $domains)
@dLobatog
dLobatog / opensourcehelp
Last active August 29, 2015 14:06
Open source projects and areas that need some help
Foreman (find help on IRC: #theforeman-dev on Freenode, http://github.com/theforeman/foreman)
- Standardize api/v2/hosts/power response across all compute resources. This requires learning what are the response codes for Openstack, EC2, VMware, etc.. and homogenize it to a standard response. More info in the PR discussion.
- Force Chef runs through Foreman UI. Possibly expand the Smart-proxy for this.
- Add location to discovery plugin. Discover hosts by MAC and use some software to get the location before retrieving facts
- Refactor app/observers and app/validators. They should either go away or move more logic into them. In particular my opinion is app/validators could get more custom validators and app/observers should go away.
- DigitalOcean Compute Resource plugin - discussion here
- Improve interactions like Kyle suggested. Basically move away from the "+ interface" -> child menu pattern (everywhere), and load by AJAX a whole new menu that creates a new object and saves it without leaving the current ed
@npf
npf / VBoxManage
Created September 10, 2014 15:05
Wrapper around VBoxManage for vagrant to use linked clones
#!/bin/bash
VBOXMANAGE=/usr/bin/VBoxManage
LOGFILE=/tmp/vagrant/vboxmanage.$(date +%s)
mkdir -p ${LOGFILE%/*}
if [ "$1" == "import" -a "$2" != "-n" ]; then
echo -e "Initial command:\n $ $0 $@" >> $LOGFILE
declare -a opts=("$@") ;
for ((i=0;i<${#opts[@]};i++)); do
case "${opts[$i]}" in
--vmname)
@ssp
ssp / git-extract-file.markdown
Created January 23, 2012 13:21
Extract a single file from a git repository

How to extract a single file with its history from a git repository

These steps show two less common interactions with git to extract a single file which is inside a subfolder from a git repository. These steps essentially reduce the repository to just the desired files and should performed on a copy of the original repository (1.).

First the repository is reduced to just the subfolder containing the files in question using git filter-branch --subdirectory-filter (2.) which is a useful step by itself if just a subfolder needs to be extracted. This step moves the desired files to the top level of the repository.

Finally all remaining files are listed using git ls, the files to keep are removed from that using grep -v and the resulting list is passed to git rm which is invoked by git filter-branch --index-filter (3.). A bit convoluted but it does the trick.

1. copy the repository to extract the file from and go to the desired branch