Skip to content

Instantly share code, notes, and snippets.

View ruter's full-sized avatar
:shipit:
Thinking

Ruter ruter

:shipit:
Thinking
View GitHub Profile
@lexrus
lexrus / delete_all_imessage_conversations.applescript
Last active January 26, 2024 16:12
Delete all iMessage conversations. Compatible with macOS Monterey. Please check Reduce motion before launch this apple script.
# 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"
@findsomeoneyys
findsomeoneyys / controller.py
Last active January 20, 2020 11:51
odoo multifile upload
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
@tkon99
tkon99 / name.js
Last active April 19, 2024 14:38
Random Name Generator for Javascript
/*
(c) by Thomas Konings
Random Name Generator for Javascript
*/
function capFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function getRandomInt(min, max) {