This file contains hidden or 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
# remove duplicate files: JPGs when RAW is present | |
from pathlib import Path | |
import os | |
class ProcessFiles(object): | |
""" | |
Walks over current dir and subdirectories searching for JPG and RAW (PEF) files. | |
Prints out a list of duplicates. |
This file contains hidden or 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
curl --data '{"tag_name": "'$TAG'","target_commitish": "'$PRODUCTION'","name": "'$TAG'","body": "","draft": false,"prerelease": false}' https://api.github.com/repos/:owner/:repository/releases?access_token=:your_access_token |
This file contains hidden or 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
""" | |
to set up auth token first authorize jenkins as an slack app and install | |
https://wiki.jenkins.io/display/JENKINS/Slack+Plugin | |
Afterwards, use https://plugins.jenkins.io/credentials-binding, which is most likely available in your jenkins install | |
and use the instructions from there to share credentials with job. Accessing credentials in python requires: os.environ['xxx'] | |
""" | |
import os | |
import requests | |
import json |
This file contains hidden or 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
# update your app settings.py with RedisSubscriber: | |
WS4REDIS_SUBSCRIBER = 'your_app.your_module.subscriber.RedisSubscriber' |
This file contains hidden or 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
javascript:!function(a){var b=document.createElement("textarea"),c=document.getSelection();b.textContent=a,document.body.appendChild(b),c.removeAllRanges(),b.select(),document.execCommand("copy"),c.removeAllRanges(),document.body.removeChild(b)}(document.title.split("]")[0].replace("[","")+" - "+document.getElementById("summary-val").textContent); |
This file contains hidden or 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
import re | |
from django.core.validators import EMPTY_VALUES | |
from django.utils.encoding import smart_text | |
from rest_framework.fields import CharField | |
from localflavor.us.forms import USPhoneNumberField as FormUSPhoneNumberField, phone_digits_re | |
from django.core.exceptions import ValidationError | |
This file contains hidden or 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 rest_framework.fields import RegexField | |
from localflavor.us.forms import USZipCodeField as FormUSZipCodeField | |
class USZipCodeField(RegexField): | |
"""" | |
A form field that validates input as a U.S. ZIP code. Valid formats are | |
XXXXX or XXXXX-XXXX. | |
.. note:: | |
If you are looking for a form field with a list of U.S. Postal Service | |
locations please use :class:`~localflavor.us.forms.USPSSelect`. |
This file contains hidden or 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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
This file contains hidden or 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
/* jslint browser: true, undef: true, newcap: true, forin: true, sub: true, white: true, indent: 4, unused: false */ | |
/* globals define: true, Settings: true, console: true */ | |
define([ | |
'app/app', | |
'ngCordova', | |
], function( | |
App | |
) { | |
"use strict"; |
This file contains hidden or 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
<li class="form-field" ng-class="{invalid: errors[name], error: errors[name]}"> | |
<input ng-model="model" ng-init="model" type="{[{field.type}]}" ng-required="{[{field.required}]}" placeholder="{[{field.label}]}" ng-maxlength="{[{field.max_length}]}" name="{[{name}]}"/> | |
<ng-include ng-if="errors[name]" src="'templates/directives/aa-forms/error_list.html'"></ng-include> | |
</li> |