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 graphene_django.views import GraphQLView | |
from django.conf import settings | |
from django.utils.decorators import classonlymethod | |
from django.views.decorators.csrf import csrf_protect, csrf_exempt | |
class NoCsrfForJSONGraphQLView(GraphQLView): | |
@classonlymethod | |
def as_view(cls, **kwargs): |
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
class Teacher { | |
} | |
class Director { | |
} | |
class Student { | |
constructor(name) { | |
this.name = name; | |
} | |
} | |
function greeting(stranger) { |
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
ab -n 10000 -c 100 -T text/json -p ping.json http://127.0.0.1:5000/ping/ |
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
require! { | |
'promise-once-events' | |
'smtp-server' | |
} | |
const SERVER_PORT = 25 | |
module.exports = class smtp-server-as-promised extends promise-once-events | |
(@options = {}) -> |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use JSON::PP (); | |
use Getopt::Long qw(GetOptions); | |
our $VERSION = 0.01; |
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
use v5.14; | |
use warnings; | |
use Test::More; | |
use Test::Mojo; | |
use FindBin; | |
require "$FindBin::Bin/../webapp.pl"; | |
my $t = Test::Mojo->new; |
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
use v5.14; | |
use Mojo::IOLoop; | |
use Data::Dump; | |
my %opts = (address => '0.0.0.0', port => 1514, map { split /=/, $_, 2 } @ARGV); | |
Mojo::IOLoop->server(%opts, sub { | |
my ($loop, $stream, $id) = @_; |
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
noauth |
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
{# templates/admin/change_list.html #} | |
{% extends "admin/base_site.html" %} | |
{% load i18n admin_urls admin_static admin_list values_result_list %} | |
{% block extrastyle %} | |
{{ block.super }} | |
<link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}" /> | |
{% if cl.formset %} | |
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" /> |