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
urlpatterns = [ | |
url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(), name='account_confirm_email'), | |
] |
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
Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file| | |
certificate_files = ['ca', 'cert', 'key', 'tls-auth'] | |
config_dir = File.dirname(file) | |
connection_name = nil | |
new_config = [] | |
File.read(file).lines.each do |line| | |
line.strip! | |
if line.start_with?('#viscosity name') |
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
version: '2' | |
services: | |
dind: | |
restart: always | |
privileged: true | |
volumes: | |
- /var/lib/docker | |
image: docker:18.06.0-ce-dind | |
command: | |
- --storage-driver=overlay2 |
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 python:3.8.0-alpine | |
EXPOSE 8000 | |
MAINTAINER "iMichael" <imichael@pm.me> | |
WORKDIR /app | |
RUN apk add --no-cache \ | |
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ |
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
import React, { forwardRef, useState, cloneElement, useContext, useEffect } from 'react' | |
import { normalizeColor } from "grommet/utils/colors" | |
import { Box, ThemeContext } from "grommet" | |
import { StyledAnchor } from "grommet/components/Anchor/StyledAnchor" | |
export const Anchor = forwardRef( | |
( | |
{ | |
a11yTitle, | |
children, |
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
class App extends Component { | |
state = { | |
activeTab: 0, | |
} | |
setTab = (i) => { | |
this.setState({activeTab: 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
const notifyDjango = (url) => { | |
// Record the URL of the file you've uploaded along with any data | |
// that is relevent to you. | |
} | |
const uploadToS3 = (file, url) => { | |
// Upload the file here | |
// See https://git.io/fhIz5 as a great example of handling all S3 upload edge cases. | |
} |
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
""" | |
This script upgrades all outdated python packages. | |
""" | |
from multiprocessing import Pool, cpu_count | |
from subprocess import PIPE, Popen | |
def run_command(command): | |
""" |
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.views.decorators.cache import cache_page | |
# MIT License | |
# Copyright (c) 2019 @iMerica | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
NewerOlder