This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff "$@" | | |
perl -ne ' | |
if (/^diff/) { $diff = $_ } | |
elsif (/^old mode/) { print $diff, $_ } | |
elsif (/^new mode/) { print $_ } | |
' | | |
git apply -R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# NOTE! this is a work in progress. This is not tested or used regularly. | |
# Ensures we do not call destructive commands on protected branches. | |
# | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will install a Git pre-push hook that prevents force pushing the master branch. | |
# Install in current Git repo: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/d465f1e331fc5c632088/raw/install-pre-push.sh | sh | |
# Uninstall: | |
# rm .git/hooks/pre-push | |
# in each repository that you've added this to. | |
GITROOT=`git rev-parse --show-toplevel 2> /dev/null` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/assets/javascripts/mobile/mobile.js b/app/assets/javascripts/mobile/mobile.js | |
index 5cd873f..1bd3710 100644 | |
--- a/app/assets/javascripts/mobile/mobile.js | |
+++ b/app/assets/javascripts/mobile/mobile.js | |
@@ -188,15 +188,17 @@ $(document).ready(function(){ | |
$(".stream").delegate("a.comment_action", "tap click", function(evt){ | |
evt.preventDefault(); | |
- var link = $(this); | |
+ var link = $(this), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
excludesfile = /home/dc/.gitignore_global | |
editor = vim | |
[diff] | |
# tool = vimdiff | |
tool = icdiff | |
# http://www.jefftk.com/icdiff | |
# https://github.com/jeffkaufman/icdiff | |
[difftool] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout local.key -out local.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
require "app/bootstrap.php.cache"; | |
require_once "app/AppKernel.php"; | |
$kernel = new \AppKernel('dev', true); | |
$kernel->loadClassCache(); | |
$kernel->boot(); | |
$boris->onStart(function($worker, $vars) use ($kernel) { | |
$worker->setLocal('kernel', $kernel); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function for starting browser in background | |
browser() { firefox "$@" & } | |
#--- Composer | |
# Fetching latest composer version. | |
alias getcomposer='curl -s https://getcomposer.org/installer | php' | |
# Fetching latest composer version if not available and run it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
umask 077 | |
answers() { | |
echo -- | |
echo SomeState | |
echo SomeCity | |
echo SomeOrganization | |
echo SomeOrganizationalUnit | |
echo localhost.localdomain |