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
| [user] | |
| name = Gonçalo Silva | |
| email = goncalossilva@gmail.com | |
| [color] | |
| ui = auto | |
| [color "branch"] | |
| current = yellow reverse | |
| local = yellow | |
| remote = green |
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 | |
| echo "Peter Van Rooijen, explaining the Law of Demeter: | |
| • You can play with yourself | |
| • You can play with your own toys (but you can’t take them apart) | |
| • You can play with toys that were given to you | |
| • And you can play with toys you’ve made yourself\n" |
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
| class Ability | |
| include CanCan::Ability | |
| def initialize(user) | |
| can :create, Comment, :post => { :published => true } | |
| end | |
| end |
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 | |
| `git diff-index --name-status HEAD`.split("\n").each do | |
| |status_with_filename| | |
| status, filename = status_with_filename.split(/\s+/) | |
| next if status == 'D' | |
| File.open(filename) do |file| | |
| while line = file.gets | |
| if line.include?("<<<<<<<") || line.include?(">>>>>>>") | |
| puts "ERROR: #{filename} has unresolved conflicts" |
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
| !!\s*([^!][^!]*)\s*!! |
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
| !!\s*(.+)\s*!! |
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
| %(\d*\$|<)?((?:,|\+| |\(|-\d+|0\d+\#)*)?(\d*)?(\.\d*)?([a-zA-Z%\s]) |
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
| curl --header "User-Agent: Todoist 43 (Android 4.2.2)" "https://android.todoist.com/TodoistSync/v2/syncAndGetUpdated" -- data-ascii 'client_id=android:APA91bFDt_EplQXjy7pdT1W5ePRyNB3Xvth7BikIWydUEWZqypOCDVp69prgOuQ4esiXLRrLP9UHRtyWFbZZJgy70mC8RbIyaaDWqwofF9pOU2lE9UI8NvzOVrzUsKGQOuFuBN7Rtz0VZe4Mt4yyPIy9WGdapVbbpw&project_timestamps={"102278254":"1370191597.14","99949946":"1370539607.95","108256199":"1370533717.63","100030395":"1370539577.4","100034513":"1369760135.84","102183937":"1369760135.84","99990400":"1369760135.84","107194585":"1369760135.84","102106782":"1369760135.84","108334364":"1370263687.65"}&labels_timestamp=1369760021.22&filters_timestamp=1368029514.05&day_orders_timestamp=1370539826.63&api_token=1465d018df51881e70191a8f62ac71e7cc00547a' |
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
| class MyDrawerLayout extends DrawerLayout { | |
| // ... | |
| @Override | |
| public void addView(View child, int index, ViewGroup.LayoutParams params) { | |
| if(child instanceof ViewGroup) { | |
| ViewGroup childVG = (ViewGroup)child; | |
| if(childVG.getBackground() == null && childVG.getChildCount() == 1) { | |
| View realChild = childVG.getChildAt(0); |
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
| // ActionBarSherlock:actionbarsherlock's build.gradle snippet | |
| dependencies { | |
| compile 'com.android.support:support-v4:18.0.+' | |
| } |