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
#!/bin/sh | |
before=`free -m| grep -A1 free|tail -1 | awk '{print $4}'` | |
echo "free memory before: $before Mbytes" | |
echo "cleaning mem!" | |
sync; echo 3 > /proc/sys/vm/drop_caches | |
after=`free -m| grep -A1 free|tail -1 | awk '{print $4}'` | |
gift=`expr $after - $before` | |
echo "free memory after: $after Mbytes (gift of $gift Mbytes)" | |
echo "done." |
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
The MIT License (MIT) | |
Copyright (c) 2013 wackoen | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
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
// Em BASH puro, usando cURL ficaria assim: | |
// curl --basic --request POST \ | |
// --url "https://oauth.hm.bb.com.br/oauth/token/?grant_type=client_credentials&scope=cobranca.registro-boletos" \ | |
// --header 'Authorization: Basic your_top_secret_base64_encoded_credentials==' \ | |
// --header 'Content-Type: application/x-www-form-urlencoded' \ | |
// --header 'cache-control: no-cache' | |
// Thanks to: http://andreybleme.com/2017-05-27/como-funciona-o-protocolo-oauth-20/ |
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
const Http = new XMLHttpRequest(); | |
setInterval(() => { | |
// Lets find if someone is waiting to join: | |
// If yes, it would exist an element with the following text inside it: | |
let string = "Alguém quer participar desta reunião" | |
ask_for_approval_element = document.evaluate('//*[text()="' + string + '"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE).snapshotItem(0) |