Assignment | |
---|---|
Assign value to variable if variable is not already set, value is returned.Combine with a : no-op to discard/ignore return value . |
${variable="value"} : ${variable="value"} |
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
from enum import Enum, EnumMeta | |
class ChoiceEnumMeta(EnumMeta): | |
def __iter__(self): | |
return ((tag, tag.value) for tag in super().__iter__()) | |
class ChoiceEnum(Enum, metaclass=ChoiceEnumMeta): | |
""" |
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
<!-- | |
<form autocomplete="off"> will turn off autocomplete for the form in most browsers | |
except for username/email/password fields | |
--> | |
<form autocomplete="off"> | |
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields --> | |
<input id="username" style="display:none" type="text" name="fakeusernameremembered"> | |
<input id="password" style="display:none" type="password" name="fakepasswordremembered"> | |
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
from collections import defaultdict | |
from django.db.models.signals import * | |
class DisableSignals(object): | |
def __init__(self, disabled_signals=None): | |
self.stashed_signals = defaultdict(list) | |
self.disabled_signals = disabled_signals or [ | |
pre_init, post_init, | |
pre_save, post_save, |
To use this bot:
- Download
ads_bot.py
andrequirements.txt
. - Type
pip install -r requirements.txt
to install the requirements. - Fill out the required information in the Python file.
- Ideally, create a (free) Slack account and set up a web hook to receive notifications from the bot.
- Run the script :)
- Relax and be ready to answer incoming calls :D
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
function getTrilateration(position1, position2, position3) { | |
var xa = position1.x; | |
var ya = position1.y; | |
var xb = position2.x; | |
var yb = position2.y; | |
var xc = position3.x; | |
var yc = position3.y; | |
var ra = position1.distance; | |
var rb = position2.distance; | |
var rc = position3.distance; |
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
convert image.tif[0] +profile 8bim -density 72 image.jpg | |
convert image.jpg -resize 2270x1512 image_resize.jpg | |
convert image_resize.jpg -gravity South -extent 1568x878+0+100 image_done.jpg | |
composite -gravity South vignette.png image_done.jpg image_comp.jpg |
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
# Ensures all line endings are committed as LF, but will checkout with native line endings | |
* text=auto | |
# -- Override Section, just in-case Git tries to be sneaky | |
# Ensure that these files are recognized as text | |
*.asp text | |
*.aspx text | |
*.asx text | |
*.c text |
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
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
NewerOlder