Skip to content

Instantly share code, notes, and snippets.

View cbertelegni's full-sized avatar

Cristian Bertelegni cbertelegni

View GitHub Profile
@vkareh
vkareh / commicrosoftteams.desktop
Last active September 10, 2022 15:16
Put this file in `~/.local/share/applications/`
[Desktop Entry]
Name=Microsoft Teams
Exec=webapp-container https://teams.microsoft.com --webappUrlPatterns=https?://*.microsoft*.com/* --app-id=commicrosoftteams --name="Microsoft Teams" --icon=~/.local/share/applications/commicrosoftteams.ico --store-session-cookies --enable-media-hub-audio --user-agent-string="Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
Icon=~/.local/share/applications/commicrosoftteams.ico
Type=Application
StartupWMClass=commicrosoftteams
OnlyShowIn=Unity
Actions=chat;teams;meetings;files
[Desktop Action teams]
@gasgas83
gasgas83 / pymchild.js
Last active January 31, 2018 18:52
Pym para Apps
<!-- PYM -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pym/1.2.0/pym.v1.min.js" ></script>
<script>
var parentPageUrl = document.URL,
pymChild = new pym.Child();
pymChild.sendMessage('pymEspecialesLoaded', 'ready');
pymChild.onMessage('setShareUrl', function(Url) {
var a = document.createElement('a');
a.href = Url;
@jacobian
jacobian / models.py
Created February 15, 2011 18:11
An example of using many-to-many "through" to augment m2m relationships. See http://www.quora.com/How-do-you-query-with-a-condition-on-a-ManyToMany-model-in-Django for context.
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=200)
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people')
class Meta:
ordering = ['name']
def __unicode__(self):