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
| def anonymize(value, options={}) | |
| options[:percent] ||= 0.6 | |
| options[:percent] = options[:percent] * 0.01 if options[:percent] > 1 | |
| options[:char] ||= '*' | |
| value_length = value.split( options[:split_by] ).first.length if options[:split_by] | |
| value_length ||= value.length | |
| obfuscated_length = ( value_length * options[:percent] ).floor | |
| start_at = (( value_length - obfuscated_length) / 2).ceil - 1 |
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
| PROMPT_COMMAND=$PROMPT_COMMAND${PROMPT_COMMAND:+;}'PS1="\[\e[01m\]\t\[\e[0m\] \[\e[1;32m\]`~/bin/branch.sh`\[\e[0m\]\[\e[1;35m\]`~/bin/stash.sh`\[\e[0m\]\[\e[33m\]\w \[\e[0m\]\[\e[1m\]\$\[\e[0m\] "' |
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
| Person = { | |
| instance: function(name, lastname) | |
| { | |
| var base = this; | |
| base._private = {} | |
| base._public = {} | |
| base._private.name = name; | |
| base._private.lastname = lastname; |
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
| -- We get a list of gradoid's for a certain pedido id | |
| SELECT | |
| mp.grado, | |
| g.gradoid | |
| FROM | |
| pedido AS p JOIN material_del_pedido AS mp USING(pedidoid) LEFT JOIN grado AS g USING(grado) | |
| WHERE | |
| p.escuelaid = 9 AND | |
| p.ciclo = '2010-2011' AND |
NewerOlder