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 | |
| $return = preg_replace( '/\b(\d{2})\D?(\d{3})\D?(\d{3})\D?(\d{4})\D?(\d{2})\b/' , '$1.$2.$3/$4-$5' , $cnpj ); | |
| echo $return; |
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
| "Ser produtivo não está ligado a quantas horas você tem que trabalhar, e sim a quanto trabalha nas horas que tem." | |
| Eu |
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
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin master |
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
| CREATE EXTERNAL TABLE IF NOT EXISTS Accesslogs( | |
| BucketOwner string, | |
| Bucket string, | |
| RequestDateTime string, | |
| RemoteIP string, | |
| Requester string, | |
| RequestID string, | |
| Operation string, |
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
| const mask = (v) => { | |
| v=v.replace(/\D/g,"") | |
| let len = v.length | |
| if (len < 12) { | |
| v=v.replace(/(\d{3})(\d)/,"$1.$2") | |
| .replace(/(\d{3})(\d)/,"$1.$2") | |
| .replace(/(\d{3})(\d{1,2})$/,"$1-$2") | |
| } else { | |
| v=v.replace(/^(\d{2})(\d)/,"$1.$2") | |
| .replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3") |
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
| "https://www.youtube.com/watch?v=lgJOJAmXlBw".match(/(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/)[5]; |
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
| SELECT SUM(funnel_1) as f1_total, SUM(funnel_2) as f2_total FROM ( | |
| SELECT | |
| if (event_name = "home_to_info1", 1, 0) AS funnel_1, | |
| if (event_name = "home_to_info1" AND next_event = "app_remove" AND next_timestamp - event_timestamp < 60 * 1000 * 1000, 1, 0) AS funnel_2 | |
| FROM ( | |
| SELECT event_name, user_pseudo_id , event_timestamp, | |
| LEAD(event_name, 1) OVER (PARTITION BY user_pseudo_id ORDER BY event_timestamp) AS next_event, | |
| LEAD(event_timestamp, 1) OVER (PARTITION BY user_pseudo_id ORDER BY event_timestamp) AS next_timestamp | |
| FROM `mobile-app-production-f37fd.analytics_189954145.events_*` | |
| WHERE event_name = "home_to_info1" OR event_name = "app_remove" |
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 Gato { | |
| constructor(nome) { | |
| this.nome = nome; | |
| } | |
| falar() { | |
| console.log(`${this.nome}: Meow!`); | |
| } | |
| }; |
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 Gato { | |
| constructor(nome) { | |
| this.nome = nome; | |
| } | |
| falar(paraPessoas) { | |
| paraPessoas.forEach(function(pessoa){ | |
| console.log(`${this.nome} para ${pessoa}: Meow!`); | |
| }) | |
| } |
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 Metronomo extends React.Component { | |
| componentDidMount() { | |
| this.primeiroContador = setInterval( | |
| () => this.contagem(), | |
| 1000 | |
| ); | |
| this.segundoContador = setInterval( | |
| () => this.contagem(), | |
| 500 | |
| ); |