This article is now published on my website: Prefer Subshells for Context.
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
| package cz.novoj.spring.security.aop; | |
| import cz.novoj.spring.security.annotation.RulesRelation; | |
| import cz.novoj.spring.security.annotation.RulesRelation.BooleanOperation; | |
| import org.springframework.core.annotation.AnnotationUtils; | |
| import org.springframework.security.access.ConfigAttribute; | |
| import org.springframework.security.access.method.AbstractMethodSecurityMetadataSource; | |
| import org.springframework.security.access.prepost.*; | |
| import org.springframework.util.Assert; | |
| import org.springframework.util.ClassUtils; |
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/bash | |
| # Gentoo prefix installation on Mac OS X (Mar. 2012) | |
| # This script may be outdated soon. | |
| # Please refer: http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml | |
| export EPREFIX="$HOME/gentoo" | |
| export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$PATH" | |
| curl -o bootstrap-prefix.sh 'http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/scripts/bootstrap-prefix.sh?format=txt' |
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 | |
| exec gnome-session --session xmonad "$@" |
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
| input { | |
| # file { | |
| # path => ["/var/log/knewton/*/*.log"] | |
| # type => "knewton_logback" | |
| # } | |
| stdin { | |
| type => "knewton_logback" | |
| } | |
| } |
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
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
| http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.gordondickens.sample</groupId> | |
| <artifactId>sample-parent</artifactId> | |
| <version>1.0.0</version> | |
| <packaging>pom</packaging> |
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
| ;; Show a notification when a push has been completed | |
| (require 'notifications) | |
| (defun notify-push (result) | |
| (notifications-notify | |
| :title "Push complete" | |
| :body (format "Org-mobile-push: %s" result) | |
| ) | |
| ) | |
| ;; Fork the work of pushing to mobile |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like 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
| function! MyFoldText() " {{{ | |
| let line = getline(v:foldstart) | |
| let nucolwidth = &fdc + &number * &numberwidth | |
| let windowwidth = winwidth(0) - nucolwidth - 3 | |
| let foldedlinecount = v:foldend - v:foldstart | |
| " expand tabs into spaces | |
| let onetab = strpart(' ', 0, &tabstop) | |
| let line = substitute(line, '\t', onetab, 'g') |