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
| App::before(function($request){ | |
| $nameProvider = Config::get('laravel-newrelic::name_provider'); | |
| if ( is_callable($nameProvider) ) { | |
| $name = $nameProvider( $request, null, $app ); | |
| } else { | |
| $name = Route::currentRouteName() | |
| ?: Route::current() && Route::currentRouteAction() | |
| ?: $request->getMethod . ' ' . $request->getPathInfo(); | |
| } |
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 | |
| $array = array( | |
| 'first' => 'test', | |
| 'second' => function(){ return 'passed'; }, | |
| ); | |
| var_dump( $array ); | |
| foreach ( $array as $k => $v ) | |
| { |
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 | |
| ## | |
| # Run as sudo, then exit and package immediately | |
| ## | |
| # Remove unnecessary packages | |
| aptitude purge ri | |
| aptitude purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
| aptitude purge python-dbus libnl1 python-smartpm linux-headers-2.6.32-21-generic python-twisted-core libiw30 |
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
| <property name="project.displayName" value="MyProject"/> | |
| <property name="project.publicFolder" value="./public"/> | |
| <property name="project.publicPort" value="8000"/> | |
| <!-- ============================================ --> | |
| <!-- Target: Server --> | |
| <!-- ============================================ --> | |
| <target name="server" description="starts a local testing server"> | |
| <echo message="Starting ${project.displayName} server in ${project.publicFolder} on port ${project.publicPort}"/> | |
| <exec command="php -S 0.0.0.0:${project.publicPort}" dir="${project.publicFolder}" logoutput="true" passthru="true"/> |
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
| Vagrant::Config.run do |config| | |
| config.vm.box = "precise64" | |
| config.vm.customize [ | |
| "modifyvm", :id, | |
| "--name", "chef-#{ENV['USER']}", | |
| "--memory", "1024" | |
| ] | |
| config.vm.network :hostonly, "10.0.0.100" |
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 config --global alias.feature '!f(){ git checkout master && git fetch && git pull origin master && git checkout -b ${1} && git push -u origin ${1}; };f' |
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
| defaults write -g KeyRepeat -integer 2 | |
| defaults write -g InitialKeyRepeat -integer 15 |