Skip to content

Instantly share code, notes, and snippets.

View tsdtsdtsd's full-sized avatar

Orkan Alat tsdtsdtsd

View GitHub Profile
@jtdp
jtdp / gist:5443297
Last active April 2, 2025 22:15
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..
@ziadoz
ziadoz / debug.conf
Last active October 4, 2018 14:23
Debugging Apache Virtualhosts
<VirtualHost *:80>
ServerName example.dev
DocumentRoot /var/www/vhosts/www.example.com/public
# Enable Rewrite Log Debugging (Apache 2.2)
RewriteLog /var/www/vhosts/www.example.com/rewrite.log
RewriteLogLevel 6
# Enable Rewrite Log Debugging (Apache 2.4)
# LogLevel alert rewrite:trace6
@nichtich
nichtich / README.md
Last active February 20, 2025 12:34 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@lucasdavila
lucasdavila / 1_ubuntu_terminal_command
Last active August 22, 2024 16:26
Installing Source Code Pro fonts in ubuntu
# to execute this gist, run the line bellow in terminal
\curl -L https://raw.github.com/gist/3875946/install_source_code_pro.sh | sh
#!/bin/bash
#Which
Grep="`/usr/bin/which grep`"
Awk="`/usr/bin/which awk`"
Cat="`/usr/bin/which cat`"
Sed="`/usr/bin/which sed`"
Curl="`/usr/bin/which curl`"
# Scrape Nagios
@mindplay-dk
mindplay-dk / migrator.php
Created June 16, 2012 19:11
Migrate a PHP codebase to use namespaces.
<?php
/**
* Namespace Migration Script
*
* @author Rasmus Schultz <[email protected]>
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*
* This script will scan through an entire PHP codebase and rewrite the
* scripts, adding a namespace clause based on the directory structure,
@petervanderdoes
petervanderdoes / filter-flow-release-start-version
Created June 5, 2012 19:12
gitflow hooks and filters for WordPress theme development
#!/bin/sh
#
# Runs during git flow release start
#
# Positional arguments:
# $1 Version
#
# Return VERSION - When VERSION is returned empty gitflow
# will stop as the version is necessary
#
@seabre
seabre / blumblumshub.coffee
Created April 15, 2012 03:52
Blum Blum Shub Pseudo Random Number Generator
# An implementation of assert.
AssertException = (message) ->
@message = message
assert = (exp, message) ->
throw new AssertException(message) unless exp
AssertException::toString = ->
"AssertException: " + @message
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ziadoz
ziadoz / awesome-php.md
Last active February 3, 2025 20:55
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.