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
/* | |
(c) by Thomas Konings | |
Random Name Generator for Javascript | |
*/ | |
function capFirst(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} | |
function getRandomInt(min, max) { |
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 MainController(http.Controller): | |
@http.route('/photo_upload', type='http', csrf=False, auth='user') | |
def photo_update(self, **kwargs): | |
Ira = request.env['ir.attachment'].sudo() | |
//img1 | |
image_buffer_random = kwargs['avatar'].stream.read() | |
image = base64.b64encode(image_buffer_random) | |
//img2 |
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
# System Preferences -> Accessibility -> Display -> Reduce motion | |
tell application "Messages" to activate | |
tell application "Messages" | |
set chatCount to (count of chats) | |
end tell | |
tell application "System Events" | |
tell process "Messages" |