Skip to content

Instantly share code, notes, and snippets.

View LeeSaferite's full-sized avatar

Lee Saferite LeeSaferite

  • Lake City, FL, US
View GitHub Profile
@zilongshanren
zilongshanren / git-export-changes-between-two-commits.md
Created March 28, 2019 01:15 — forked from mrkpatchaa/git-export-changes-between-two-commits.md
Git command to export only changed files between two commits

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.

@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@tmaiaroto
tmaiaroto / Dockerfile
Last active June 30, 2022 08:48
WordPress on Amazon ECS
FROM alpine:3.3
MAINTAINER Tom Maiaroto <tom@outdoorsy.co>
# Install packages
RUN apk --update --repository http://dl-3.alpinelinux.org/alpine/edge/main add \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
php7 \
@LeeSaferite
LeeSaferite / xdebug_commandline.sh
Created July 13, 2016 12:42
Run PHP xdebug from the CLI
PHP_IDE_CONFIG='serverName=SOME_SERVER' php -d xdebug.remote_autostart=1 some_script.php
@drobinson
drobinson / xdebug_settings.ini
Last active June 23, 2020 19:34
Xdebug settings for debugging using remote hosts and how to debug cli php scripts
zend_extension= /usr/lib/php/20170718/xdebug.so
[xdebug]
; This is the default, but just to be sure...
xdebug.remote_port = 9000
; Make sure vmhost is set in /etc/hosts as the ip address of your host machine
; from your virtual machine (set in virtual box as the host-only adapter ip)
@fbrnc
fbrnc / gist:5864315
Last active December 18, 2015 23:49
Install some dev-tools
TARGETFOLDER="/usr/local/bin"
sudo curl -sSo $TARGETFOLDER/modman https://raw.github.com/colinmollenhour/modman/master/modman && sudo chmod +x $TARGETFOLDER/modman
sudo curl -sSo $TARGETFOLDER/n98-magerun.phar https://raw.github.com/netz98/n98-magerun/master/n98-magerun.phar && sudo chmod +x $TARGETFOLDER/n98-magerun.phar
sudo curl -sSo $TARGETFOLDER/phpunit.phar https://phar.phpunit.de/phpunit.phar && sudo chmod +x $TARGETFOLDER/phpunit.phar
sudo curl -sSo $TARGETFOLDER/phploc.phar https://phar.phpunit.de/phploc.phar && sudo chmod +x $TARGETFOLDER/phploc.phar
sudo curl -sS https://getcomposer.org/installer | php -- --install-dir=$TARGETFOLDER
@colinmollenhour
colinmollenhour / Data.php
Created May 17, 2012 02:45
Zend_Locale_Data local caching fix.
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
@rduplain
rduplain / MainActivity.java
Created May 8, 2012 20:08
A very simple full-screen WebView activity for Android native wrappers, as a starting point.
package com.willowtreeapps.demo;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
@yieldthought
yieldthought / gist:1334618
Created November 2, 2011 19:25
screen status line
hardstatus alwayslastline
hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR} (%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}] %{=b C}[ %m/%d %c ]%{W}'
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh