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 django import forms | |
from django.core.validators import RegexValidator | |
from django.utils.translation import gettext_lazy as _ | |
class ContactForm(forms.Form): | |
street_and_number = forms.CharField( | |
max_length=200, | |
label=_('Street and house number') | |
) | |
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
(() => { | |
let file = null | |
let iframe = null | |
let version = 'v2' | |
window.initPersonalAdmin = () => { | |
file = window.serverJSON.files.find(f => f.vUrl == `zip/pitcher_personal_admin_${version}.zip`) | |
if (file) { | |
iframe = document.createElement('iframe') |
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
{"lastUpload":"2020-11-13T09:58:04.931Z","extensionVersion":"v3.4.3"} |
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
#!/usr/bin/env bash | |
FILE=875483 | |
SLIDES=(1 2 3 4) | |
WORKING_DIR=/tmp/875483_1592496241 | |
if [[ ! -d $WORKING_DIR ]]; then | |
mkdir /tmp/875483_1592496241 | |
fi |
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
var urlPieces = window.location.href.split('/'); | |
var slideFolder = urlPieces[urlPieces.length - 2]; | |
function gotoPage(p) { | |
for (var i = 0; i < slideOrder.length; i++) { | |
var pieces = slideOrder[i].split('|'); | |
if (pieces[0] == slideFolder && pieces[1] == "" + p) { | |
Ti.App.fireEvent('gotoVSlide', {p: i}); | |
} | |
} |
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
# -*- coding: utf-8 -*- | |
import json | |
import six | |
from django.conf import settings | |
from django.core.files import File | |
from django.http import QueryDict | |
from django.utils import six | |
from djangorestframework_camel_case.settings import api_settings | |
from djangorestframework_camel_case.util import _get_iterable, camel_to_underscore, is_iterable |
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
#!/usr/bin/python | |
import subprocess | |
import boto3 | |
cw = boto3.client('cloudwatch', region_name='eu-west-1') | |
ctn_ip = subprocess.check_output('curl --silent ifconfig.co', shell=True).strip() | |
stats_lines = subprocess.check_output([ | |
'/usr/bin/docker', | |
'stats', |
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
Vue.component('chapters', { | |
template: `<div v-if="chapters.length > 0" class="field"> | |
<h2 class="ui header">Rearrange Chapters</h2> | |
<p><i class="arrows alternate icon"></i> Tap on chapter to start moving</p> | |
<div class="ui grid"> | |
<div v-for="c in chapters" class="four wide column"> | |
<div class="ui grid"> | |
<div class="chapter" :class="{ 'twelve wide column': moving, 'sixteen wide column': !moving }"> | |
<div class="ui card" @click="startMoving(c)"> | |
<div class="image"> |
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 addHook(hook, eventName) { | |
let event = window[eventName]; | |
window[eventName] = function() { | |
setTimeout(() => { | |
try { | |
hook.apply(null, arguments); | |
} catch (e) { | |
console.error(e); | |
} |
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() { | |
$.fireEvent = function(name, data) { | |
var deferred = $.Deferred(), | |
callback = 'cb' + Math.random().toString(36).substring(7); | |
if (data) { | |
data.callBackFunc = callback; | |
data.callBack = callback; | |
data.source = $.fireEvent.defaults.source; | |
} |
NewerOlder