Skip to content

Instantly share code, notes, and snippets.

View renekorss's full-sized avatar

Rene Korss renekorss

View GitHub Profile
@mrkpatchaa
mrkpatchaa / git-export-changes-between-two-commits.md
Last active June 20, 2024 15:42
[Git command to export only changed files between two commits] #git

Use case : Imagine we have just created a project with composer create-project awesone-project (currently V0.2). 2 weeks later, there is a new release (V0.3). How to update your project ? Since composer update only updates the project dependencies, it is not what we are looking for. Composer doesn't know about awesome-project since it's not in our composer.json.

After trying many git solutions, I've come to this :

git archive --output=changes.zip HEAD $(git diff --name-only SHA1 SHA2 --diff-filter=ACMRTUXB)

This command will check for changes between the two commits and ignore deleted files.

@odan
odan / xampp_php7_xdebug.md
Last active June 28, 2024 12:58
Installing Xdebug for XAMPP
@tanelj
tanelj / voog_page_content_copy.rb
Last active May 10, 2022 10:16
Small script to migrate content and/or elements between Voog CMS (www.voog.com) pages. Read more about Voog API www.voog.com/developers/api. Depends on https://gist.github.com/tanelj/a64d58185551976874d5
#!/usr/bin/env ruby
# Script to copy Voog (www.voog.com) page content areas and/or elements between pages.
# It uses functions from Voog migrator script https://gist.github.com/tanelj/a64d58185551976874d5, that should be in same folder.
require_relative 'voog_migrator'
def copy_articles!(mappings)
mappings.each do |k, v|
source_page = @migrator.source.page_by_path(k)
target_page = @migrator.target.page_by_path(v)
@adamalbrecht
adamalbrecht / ngDebounce.js
Last active December 9, 2022 20:16
Simple debounce function for Angular.js found at the link below and slightly tweaked. http://plnkr.co/edit/fJwRER?p=info
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
angular.module('ngDebounce', []).factory('$debounce', function($timeout, $q) {
return function(func, wait, immediate) {
var timeout;
var deferred = $q.defer();
return function() {
var context = this, args = arguments;