Skip to content

Instantly share code, notes, and snippets.

View delusioninabox's full-sized avatar
🌈
me + JS = 💥

Laura Kajpust delusioninabox

🌈
me + JS = 💥
View GitHub Profile
@stevehanson
stevehanson / emblem_to_hbs.rb
Last active February 22, 2019 21:54
Convert all project Emblem files to handlebars
class EmblemToHbs
def convert
Dir.glob("**/*.emblem").each do |file|
convert_file(file)
end
end
def convert_file(file)
`emblem2hbs #{file}`
File.delete(file)
@mwise
mwise / README.md
Last active July 14, 2023 14:11
Git hook to prevent merging staging branch into master branch

To use this hook:

  • add the prepare-commit-msg file at .git/hooks/prepare-commit-msg and edit as needed
  • make it executable: chmod +x .git/hooks/prepare-commit-msg
  • disable fast-forward merges: git config branch.master.mergeoptions "--no-ff"
  • that's it!

NOTE: after a failed merge from a forbidden branch, the working tree will still be in a MERGING state. To discard the local working copy state, run: git reset --merge