A Pen by Fabricio Quagliariello on CodePen.
This file contains 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
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* User: fabricio | |
* Date: 12/11/12 | |
* Time: 9:22 AM | |
*/ | |
public class Main { | |
public static void main(String[] args) { |
This file contains 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
### Aliases for postgres | |
pg_function() { | |
pg_ctl -D /usr/local/var/postgres -l logfile "$@" ; | |
} | |
alias pg="pg_function" # so now you may start and stop postgres using pg start or pg stop |
This file contains 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 | |
/* | |
* This file is part of the Symfony package. | |
* | |
* (c) Fabien Potencier <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains 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
List<string> someStrings = new List<string>() { “hello”, “goodbye”, “thanks”}; | |
int count = someStrings.Count(); | |
int count2 = someString.Count; |
This file contains 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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
This file contains 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
AL: 'Alabama', | |
AK: 'Alaska', | |
AZ: 'Arizona', | |
AR: 'Arkansas', | |
CA: 'California', | |
CO: 'Colorado', | |
CT: 'Connecticut', | |
DE: 'Delaware', | |
FL: 'Florida', | |
GA: 'Georgia', |
This file contains 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
def log(message, level= :info, banner= false) | |
BH.logger.send level, '-'*80 if banner | |
BH.logger.send level, message | |
BH.logger.send level, '-'*80 if banner | |
end |
This file contains 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 CredentialsController < ApplicationController | |
def authorize_credentials | |
redirect_to new_polymorphic_path([current_user, credential_type.new], request.query_parameters) | |
end | |
private | |
def credential_type | |
Credentials::SalesforceInstanceCredential |
This file contains 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
# See https://github.com/bhuga/promising-future | |
require "ost" | |
require "future" | |
Ost.redis.call('FLUSHDB') | |
300.times do |i| | |
Ost[:foo] << i | |
end |
OlderNewer